Gif Posted July 7, 2007 Share Posted July 7, 2007 so , i have a problem with exiting from loops For $Stp = 0 To 20 While 1 WEnd NextoÝ÷ ØZ½æ¢ëwÑhbíVwe¢ljwbÁ©í§޲ƺÛhØ^¦º ©¡ìbµ©e)²z-¢yr¢w°)^Õa'vZ(¥»jYh~Ø^ÊÆ+e¢fm]¢ØZµ©ÝÚâyÙ+ax,²ç!jÊeiȧ«¢+ØÀÌØíµÍôU%Q5M ¤)%ÀÌØíµÍô¸¸¸¸¸¸)á¥Ñ±½½À)¹% on the For - Next loop but doesnt work... any suggestions? Link to comment Share on other sites More sharing options...
Generator Posted July 7, 2007 Share Posted July 7, 2007 Maybe Global a Var as a Bool and make it true So While $Bool=True WEnd And set a hotkey for $Bool=Not $Bool Just some thoughts. Link to comment Share on other sites More sharing options...
Gif Posted July 7, 2007 Author Share Posted July 7, 2007 Maybe Global a Var as a Bool and make it trueSo While $Bool=TrueWEndAnd set a hotkey for $Bool=Not $BoolJust some thoughts.just tried that but again it continues the loop ... Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 7, 2007 Share Posted July 7, 2007 just tried that but again it continues the loop ... That technique WILL work, so you've confused the issue at some point, like only putting that condition on an outer loop while it's looping on an inner nested one: HotKeySet("{ESC}", "_Break") $Run = 1 While $Run While $Run While $Run While $Run Sleep(20) WEnd WEnd WEnd WEnd MsgBox(64, "Done.", "Done.") Func _Break() $Run = 0 EndFunc If any of those inner loops is NOT testing for $Run, then it will loop forever. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Vindicator209 Posted July 7, 2007 Share Posted July 7, 2007 well, erm, put If $endloop = True Then ExitLoop In every loop you have, then set a hotkey to make $endloop equal True? [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] 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