Hello! I need some help with a script I am trying to make.
What I am trying to achieve:
Upon press of "r", I want the script to check if the "Space" is down (not physically, but from a previous "Send {Space D}" command), and if so do nothing. But if "Space" is Up, then "Send Space".
I tried something like this, but it doesn't seem to work:
r::
GetKeyState, state, Space
if state = U
Send {Space D}.
return
Please help
AHK GetKeyState use? Topic is solved
-
- Posts: 33
- Joined: 09 Apr 2016, 22:14
Re: AHK GetKeyState use?
Send {Space D} is only the Down but will not send a Space because the Space is sent on the Up. So you want to send the Down and the Up:
Also, check out the following, it may help for what you are trying?
https://autohotkey.com/docs/commands/_M ... Hotkey.htm - #MaxThreadsPerHotkey - Sets the maximum number of simultaneous threads per hotkey
Code: Select all
Send {Space}
Code: Select all
#MaxThreadsPerHotkey,1 ; no re-entrant hotkey handling
Who is online
Users browsing this forum: garry and 139 guests