Jump to content

Loop infinate then break when key pressed.


Recommended Posts

Quick Example

HotKeySet("{esc}","LoopFlagToggle")

$loopflag = 0
Do
    msgbox(0,"Looping with DO LOOP","Looping until ESC key is pressed")
Until $loopflag <> 0

$loopflag = 0
While $loopflag = 0
    msgbox(0,"Looping with WHILE LOOP","Looping until ESC key is pressed")
WEnd

Func LoopFlagToggle()
    $loopflag = 1
EndFunc
Link to comment
Share on other sites

C:\Documents and Settings\Carrie\Desktop\mybestauto.au3 (119) : ==> "Func" statement has no matching "EndFunc".:

Func LoopFlagToggle()

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????c

>Exit code: 1 Time: 0.353

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...