Run makro while key is pressed

Ask gaming related questions
Posts: 5
Joined: 05 Jun 2019, 11:03

Run makro while key is pressed

01 Sep 2019, 07:43


i am using a simple script for keeping a button pressed. Now i want to modify it but i am not sure which command i need. The Makro should run while the button is pressed, if the button is released then the makro should stop, if pressed again it should run again. A keywait or GetkeyState command would be right i think. So i can add maybe a short time, i want to say: if button RButton is pressed for 1 second then start .. and press the Numpad1 up and down every 100 ms. Here is my skript: Numpad 2 is not needed, only Numpad1 and RButton, it was just a try.

while (GetKeyState("RButton"))
Loop 50000
Send {Numpad1 Down}
Sleep 10
Send {Numpad1 Up}


i would be thankful for any help.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 34 guests