unknown12 Posted September 4, 2006 Share Posted September 4, 2006 I've got this while loop: While FileExists($Script) WEnd How can I make something happen only once inside the loop, but keep it going? I've already tried do...until but maybe i wasnt doing it right. Link to comment Share on other sites More sharing options...
Helge Posted September 4, 2006 Share Posted September 4, 2006 (edited) I think this is what you need..While 1 Sleep(10) ; lowers CPU-usage If FileExists($file) Then ; do something EndIf WEndEdit : I read thru it a couple of times and it made me unsure..Could you explain what you mean, a little bit more detailed ? Edited September 4, 2006 by Helge Link to comment Share on other sites More sharing options...
unknown12 Posted September 4, 2006 Author Share Posted September 4, 2006 Sorry, does this make any more sense? While 1 While FileExists($file) send("Hello!") WEnd WEnd That will repeatedly send the text "Hello!". I want to only send the text once. How could I do this? Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 4, 2006 Share Posted September 4, 2006 Hi, like ??? $status = 0 $file = "c:\temp\java.txt" While 1 If FileExists($file) And $status = 0 Then Send("Hello!") $status = 1 Sleep(1000) EndIf Sleep(100) WEnd So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now