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?
1 key to 2 with delay
Re: 1 key to 2 with delay
Hallo,
try this:or that (spares the thread of the first second):
try this:
Code: Select all
~LAlt::
KeyWait, LAlt, T1
If ErrorLevel
{
Send {Blind}{f DownR}
KeyWait, LAlt
Send {Blind}{f Up}
}
Return
Code: Select all
~LAlt::
SetTimer, TF, -1000
HotKey, ~LAlt, Off
Return
TF:
HotKey, ~LAlt, On
If GetKeyState("LAlt","P")
{
Send {Blind}{f DownR}
KeyWait, LAlt
Send {Blind}{f Up}
}
Return
Re: 1 key to 2 with delay
oh my dear "friend", Rohwedder. german? then ..>
i used your 1st script and it's what i want. i actually tweaked the timer to 0.1 after some testing (0.5 and 0.3) and now it all works perfectly.
ps: are you also a gamer on pc? if yes, do you use steam?
later edit; no answer friend? ......fine, i was only gonna reward you with a potential steam game..
i used your 1st script and it's what i want. i actually tweaked the timer to 0.1 after some testing (0.5 and 0.3) and now it all works perfectly.
ps: are you also a gamer on pc? if yes, do you use steam?
later edit; no answer friend? ......fine, i was only gonna reward you with a potential steam game..
Who is online
Users browsing this forum: jaka1, penguinautomator, Spawnova and 246 guests