1 key to 2 with delay
Posted: 21 Jun 2018, 12:41
am i still on? testing 123.....
if yes, i need a delay or similar between alt & f, for the following script;
LAlt::
Send {LAlt down}
Send {f down}
Return
LAlt up::
Send {LAlt up}
Send {f up}
Return
it's for a game. normally, without a script, if i press alt it aims the gun. if whilst in that view, i press f, it then changes to an ironsight view. you have to press and hold two keys to get ironsights. i just want to press one key, alt, to get ironsights. i find it abhorrent and idiotic to have to press and hold two keys to achieve what most games let you via one key. okay, so i searched and found the above script and tested it. it works, kinda. if i press alt with the script, it only goes to aim view, as normal. however, if i quickly tap the alt key, it does what i want. doing that is not natural or how it should be. i am almost certain adding a delay of maybe half a second between the time alt and f "unite", should fix the issue. without a script when i do it like i am supposed to, i press alt and then a few moments later press f. if i was to press alt+f simultaneously even without the script it would not work either. so i don't actually want the script to make alt be alt+f simultaneously, i want my left alt to be alt and very shortly also accept the input of f. i want to use one key to achieve two key presses that in game, naturally, happen with a separate push for f.
so i now add a delay and tried a few different timer values;
LAlt::
Send {LAlt down}
SetKeyDelay, 1000
Send {f down}
Return
LAlt up::
Send {LAlt up}
Send {f up}
Return
i tried some, and settled on 1 second. in reality i suppose it take me one second to press alt and then whilst holding it with my finger use another finger to locate and press/hold f after. the script now works better in that the 1st alt press always goes to ironsight view. yay. except not. after that back to normal, meaning i have to quickly double tap alt to go to ironsight. i'm missing something. could the "exit" part of the script be somehow interfering?
if yes, i need a delay or similar between alt & f, for the following script;
LAlt::
Send {LAlt down}
Send {f down}
Return
LAlt up::
Send {LAlt up}
Send {f up}
Return
it's for a game. normally, without a script, if i press alt it aims the gun. if whilst in that view, i press f, it then changes to an ironsight view. you have to press and hold two keys to get ironsights. i just want to press one key, alt, to get ironsights. i find it abhorrent and idiotic to have to press and hold two keys to achieve what most games let you via one key. okay, so i searched and found the above script and tested it. it works, kinda. if i press alt with the script, it only goes to aim view, as normal. however, if i quickly tap the alt key, it does what i want. doing that is not natural or how it should be. i am almost certain adding a delay of maybe half a second between the time alt and f "unite", should fix the issue. without a script when i do it like i am supposed to, i press alt and then a few moments later press f. if i was to press alt+f simultaneously even without the script it would not work either. so i don't actually want the script to make alt be alt+f simultaneously, i want my left alt to be alt and very shortly also accept the input of f. i want to use one key to achieve two key presses that in game, naturally, happen with a separate push for f.
so i now add a delay and tried a few different timer values;
LAlt::
Send {LAlt down}
SetKeyDelay, 1000
Send {f down}
Return
LAlt up::
Send {LAlt up}
Send {f up}
Return
i tried some, and settled on 1 second. in reality i suppose it take me one second to press alt and then whilst holding it with my finger use another finger to locate and press/hold f after. the script now works better in that the 1st alt press always goes to ironsight view. yay. except not. after that back to normal, meaning i have to quickly double tap alt to go to ironsight. i'm missing something. could the "exit" part of the script be somehow interfering?