I asked this question some time ago and thought I had it all solved. Seemed to work fine, but turns out, this
was ONLY due to the actions I had assigned in that particular game and does not work as intended
Currently playing Dead Space 1 and the "G" key is for actions (picking up stuff, opening doors and the like)
Fairly often, there is a log file that can be picked up and is automatically displayed on screen. To exit this
log file, the "ESC" key is necessary. Well, I would like to make tap for "G" and hold for "ESC"
---------------------------------------------------------------
$g::
KeyWait, g, T2
if (ErrorLevel = 1)
Send, {esc}
else
Send, {esc}
KeyWait, g
return
---------------------------------------------------------------
The above is one of several attempts from the following thread in an attempt to make user timeflies code work for me to no avail.
https://autohotkey.com/boards/viewtopic ... ions#p9794
The code above is obviously flawed, but tried quite a few attempts and this is just the last one.
Any and all input is appreciated
tap for one key hold for a second key
tap for one key hold for a second key
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask
Re: tap for one key hold for a second key
Hallo,
try:If you want to send either "g" or "{Esc}g", just change it.
try:
Code: Select all
$g::TimeG:= A_PriorHotkey = "$g" ? TimeG : A_TickCount + 300 ;tap < 300ms
$g Up::Send,% A_TickCount < TimeG ? "g" : "{Esc}" ;sends either "g" or "{Esc}"
Re: tap for one key hold for a second key
Danke, aber es geht nicht
Hope I said that right, as my Google> Deutsch is a bit rusty
Turns out, there are segments of game when I must use the "G" key in rapid succession. I temporarily added
a second command under this key and those times when rapid succession was required..... it did not work.
My current solution is as follows:
--------------------------------------------------------------------------
;key MButton to pick up the log-file and plays after a necessary 1 second delay
;key MButton a second time to exit log-file and gameplay returns to normal
MButton::
{
Send {g down}<-----------------------------;picks up log-file
Sleep, 100
Send {g up}
Sleep, 1000
send {n down}<-----------------------------;plays the log-file
Sleep, 100
send {n up}
sleep, 100
}
return
--------------------------------------------------------------------------
This requires a second key, but since the MButton was not programmed for anything anyway, it is the next best thing
A solution would still be great, as I am sure to have a use for it in the future
Thanks,
Hope I said that right, as my Google> Deutsch is a bit rusty
Turns out, there are segments of game when I must use the "G" key in rapid succession. I temporarily added
a second command under this key and those times when rapid succession was required..... it did not work.
My current solution is as follows:
--------------------------------------------------------------------------
;key MButton to pick up the log-file and plays after a necessary 1 second delay
;key MButton a second time to exit log-file and gameplay returns to normal
MButton::
{
Send {g down}<-----------------------------;picks up log-file
Sleep, 100
Send {g up}
Sleep, 1000
send {n down}<-----------------------------;plays the log-file
Sleep, 100
send {n up}
sleep, 100
}
return
--------------------------------------------------------------------------
This requires a second key, but since the MButton was not programmed for anything anyway, it is the next best thing
A solution would still be great, as I am sure to have a use for it in the future
Thanks,
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask
Re: tap for one key hold for a second key
See here for a robust implementation : https://autohotkey.com/boards/viewtopic.php?f=6&t=45116
Who is online
Users browsing this forum: No registered users and 73 guests