Jump to content
Sign in to follow this  
kevr0

help! how to "if event occured 3 times then, etc"

Recommended Posts

kevr0

I'm trying to figure out how to do this properly.

Basically, I have a script to perform a task after executing a pixel search; this repeats over and over. After the third time completing the task I want it to send("dance") and then restart the pixel search process.

Share this post


Link to post
Share on other sites
Makaule

You could use something like this:

Global $var = 0

While 1 
    [Your actions]
    If [something] Then $var += 1
    If $var = 3 Then 
        $var = 0
        Send("Dance")
    EndIf
WEnd

Share this post


Link to post
Share on other sites
kevr0

Thanks! I didn't realize how simple but complex autoit can be.

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  

×