Sign in to follow this  
Followers 0
METVSTUDIOS

Loop infinate then break when key pressed.

5 posts in this topic

I want this function to LOOP INFINITE until i send a certain key.

Please.

Im new.

METVSTUDIOS.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks soo much man!

U PPLZZ RULE!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

$loopflag = 0

Do

MouseClick("right")

sleep(800)

Until $loopflag <> 0

Func LoopFlagToggle()

$loopflag = 1

EndFunc

(WAS SCRIPT)

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