How do I make a script work ONLY when a button is being held down
How do I make a script work ONLY when a button is being held down
Im not sure how to do this, could someone help?
Re: How do I make a script work ONLY when a button is being held down
Use conditional hotkeys.
#If (GetKeyState("KEY", "P"))
Write the hotkeys you want to be triggered only when the key is pressed down here, below #If getkeystate.
Write
#If
again to end condition.
#If (GetKeyState("KEY", "P"))
Write the hotkeys you want to be triggered only when the key is pressed down here, below #If getkeystate.
Write
#If
again to end condition.
I am your average ahk newbie. Just.. a tat more cute.
-
- Posts: 16
- Joined: 16 Jun 2018, 00:54
Re: How do I make a script work ONLY when a button is being held down
$LButton:: ; change this to whatever you want to hold down
While getkeystate ("LButton","P") ; change this to the same as above
{
---- ; put the script that only runs when you hold the hotkey in these brackets
}
Return
While getkeystate ("LButton","P") ; change this to the same as above
{
---- ; put the script that only runs when you hold the hotkey in these brackets
}
Return
Who is online
Users browsing this forum: No registered users and 46 guests