Sign in to follow this  
Followers 0
Gif

many loops exiting

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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.

just tried that but again it continues the loop ...

Share this post


Link to post
Share on other sites

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.

:whistle:


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

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0