A long time ago, a friendly dude from the AHK forums wrote a simple script for me that was perfect.
The purpose of the script is to use the F4 key to initiate/start the automatic rotation of pressing the 4 key (number, not keypad). There is a 22 second (22000ms) delay before the 4 key is being pressed again, and so it continues forever until pressing F4 again to stop the automatic rotation.
Please see the script here. It works great.
Code: Select all
F4:: ;On/Off with key F4
Send4active := !Send4active
If Send4active
SetTimer Send4, 22000 ;spams the 4 key every 22000ms
Else
SetTimer Send4, Off
Return
Send4: ;spams key 4
Send, 4
Return
And then the script just rotates forever until F4 is being pressed again to deactivate the automatic rotation.
Can anyone help me with this?
Thank you!
[Mod edit: Wrong subforum: Moved topic to AHK v1 help, since this is not v2 code.]