Guest Reese Stonecut Posted June 27, 2005 Posted June 27, 2005 (edited) Hello... I wanna make a macro that will do this for me: Upon my right clicking, it will press key 2, then right click; press key 3, right click again and finally, press key 1 and stand by to my next right click so it will perform the sequence again when I do so... Problem is: I don´t seem to find a way to bind my right clicking to the rest of the sequence... Can anyone please help me? Here´s the structure of the script: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; variable that comtrols the loop Dim $isRunning = 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; main function: executes macro when isRunning = 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func ExecuteLoop() Sleep(1000) Send("!2") Sleep(500) MouseClick("right") Sleep(1000) send("!3") Sleep(500) MouseClick("right") Sleep(1000) send("!1") EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; executes function MouseClicked ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func MouseClicked() MsgBox(64, "debug","mouseclicked executado") EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; turns loop ON ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func InitLoop() MouseClicked() if $isRunning = 0 then $isRunning = 1 endif EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ends loop ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func EndLoop() $isRunning = 0 EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; configures ON and OFF hotkeys ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HotKeySet("{F9}", "InitLoop") HotKeySet("{F10}", "EndLoop") While 1 WEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Thanks in advance I hope someone here can help me! Edited June 27, 2005 by Reese Stonecut
therks Posted June 27, 2005 Posted June 27, 2005 Check out the _IsPressed UDF, it can detect mouse clicks. My AutoIt Stuff | My Github
Guest Reese Stonecut Posted June 27, 2005 Posted June 27, 2005 (edited) Thanks, I´m gonna check it right now...I´ll edit here with the results ^^EDITMAN, it works... I love you... And the creator of that thing ^^ Edited June 27, 2005 by Reese Stonecut
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now