Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Break While/Do Loops

$
0
0
Ok , first of all in C++ Break means Exit the While Loop , but in Autoit ExitLoop means Exit the Script so i want an example to stop the loop without exiting the whole script

my code is :

[ autoit ]      
Func _StopLoop()    Global $off = 2     EndFunc Func _Loop()     Global $off = 0 Do While 1     If _IsPressed("12") Then         MouseClick("Left")     EndIf Until $off > 0 Return EndFunc

I tried that with HotKeySet but it don't stop the loop and when i use Exit Loop it exit the script and when i use While NOT $off > 0 all of this exits the script

So please give me an example without closing the script.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>