houseonfire Posted September 22, 2008 Share Posted September 22, 2008 I have a loop that I need to run until the a ($stop) button is pressed. But if i use if $stop then ExitLoop Then it just ends the loop when that command is hit. Can someone help me out please? Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 22, 2008 Share Posted September 22, 2008 If $stop = True Then Exitloop also Dim $stop in your code as False. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
tgarr Posted September 23, 2008 Share Posted September 23, 2008 I have a loop that I need to run until the a ($stop) button is pressed. But if i use if $stop then ExitLoop Then it just ends the loop when that command is hit. Can someone help me out please? do a hotKeySet at the start of your script. should look something like this: HotKeySet( "{ESC}" , "Terminate") Func Terminate () Exit 0 EndFunc Link to comment Share on other sites More sharing options...
houseonfire Posted September 23, 2008 Author Share Posted September 23, 2008 (edited) Hmm.. Thanks for your guys' help. I cant get the Dim to work.. Dim $stop = False ... ... If $stop1 = True Then Exitloop That seems to just make the loop stop when it hits the "If $stop1 = True Then Exitloop". Thanks tgarr for the suggestion, but I considered this and I didn't like the idea of the hotkeys. Thanks though. Edited September 23, 2008 by houseonfire Link to comment Share on other sites More sharing options...
Prab Posted September 24, 2008 Share Posted September 24, 2008 Could you post more of your code? Exitloop should work. FolderLog GuiSpeech Assist Link to comment Share on other sites More sharing options...
houseonfire Posted September 24, 2008 Author Share Posted September 24, 2008 Exit loop does work, It just exits the loop when it hits the string that tells it to, and not when I click the button. Link to comment Share on other sites More sharing options...
Prab Posted September 24, 2008 Share Posted September 24, 2008 (edited) Add MsgBox(0,"",$stop) right before the if statement to verify that $stop is really false at that point. It might also be an issue with it being a string "True". Try switching it to:If $stop = "True" Then Exitloop Edited September 24, 2008 by Prab FolderLog GuiSpeech Assist Link to comment Share on other sites More sharing options...
houseonfire Posted September 24, 2008 Author Share Posted September 24, 2008 The MSGbox pops up the number 10.. Link to comment Share on other sites More sharing options...
ReaImDown Posted September 24, 2008 Share Posted September 24, 2008 The MSGbox pops up the number 10..dountil $stop = 1While $stop <> 1wend [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Prab Posted September 24, 2008 Share Posted September 24, 2008 In autoIt, 10 = True so you code is doing what it is supposed to. Now you job is to find out why $stop is 10. FolderLog GuiSpeech Assist 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