Sign in to follow this  
Followers 0
Ethereal401

Is this even possible?

3 posts in this topic

I want to use the left mouse key once to run one set of instructions, than press it again to do another set of instructions, and press the same key again for a 3rd different set of instructions. Is this possible in the same macro?

So I hit the left mouse bottom one thing happens. I hit it again another things happens. I hit it again a completely different thing happens, and if I hit it a forth time the first function runs again...

Is this possible with autoit?

Share this post


Link to post
Share on other sites



Maybe make a function that counts every time you hit the key. Then call the new function depending on what the count is.

Share this post


Link to post
Share on other sites

$x = 0

HotKeySet("{ESC}", "CountFunc")

While 1
    Sleep(100)
WEnd

Func CountFunc()
    $x += 1
    if $x >= 4 then $x = 1
    if $x = 1 then MsgBox(0,"","Do thing 1")
    if $x = 2 then MsgBox(0,"","Do thing 2")
    if $x = 3 then MsgBox(0,"","Do thing 3")
EndFunc

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