Hello again all
i have a question about something i have in my brain but cant remember. been years since i had to deal with this. ill make a hypothetical description to keep it simple for now.
while holding any key( we'll use "1") down, tap any other key( we'll use "2") and release. still holding the 1, it has stopped sending. is there a way to have the first key continue without release and repress?
testing in notepad. it would look like this to me,"1111111111111111111222222". i want it to look something like this,"11111111111111111112222221111111111111111111".
what its for:
game called Fortnite. there is an inventory "while held" button. if you are holding w(move forward) and press and release that inventory button, you have to release and press w again to continue moving forward. trying to get w to keep sending when inventory("LAlt") is released.
i know ive used a script to remedy this before but cant find it.
thank you
AF
Continue Sending Key After Pressing Another
Re: Continue Sending Key After Pressing Another
You can use ~2 up:: to detect when the button 2 is released.
Re: Continue Sending Key After Pressing Another
yes, that is one of the things i tried from my old bag of tricks. maybe its my system or keyboard? but im pretty sure its common for KBs to stop sending in that situation. its a ps/2 type.
does that work for you? i have no problem with the script understanding what i want it to do. the 1 just wont resume sending.
edit: maybe i could make it work if i know a command or script to have keys repeat or loop.
here is the last script i was messing with. is gives "11111111111111122222221" on notpad.. only one "1".
~2 up::
Send {1 up}
sleep 100
Send {1 down}
keywait, 1, U
Send {1 up}
return
does that work for you? i have no problem with the script understanding what i want it to do. the 1 just wont resume sending.
edit: maybe i could make it work if i know a command or script to have keys repeat or loop.
here is the last script i was messing with. is gives "11111111111111122222221" on notpad.. only one "1".
~2 up::
Send {1 up}
sleep 100
Send {1 down}
keywait, 1, U
Send {1 up}
return
Last edited by Fat on 11 Nov 2017, 22:20, edited 1 time in total.
Re: Continue Sending Key After Pressing Another
you have to use a loop to send multiple 1. In it use GetKeyState to check if 1 is still pressed down.
Re: Continue Sending Key After Pressing Another
well i got it working for one cycle, then it gets stuck in loop. now i need to find a way to have it start over when LAlt is pressed again.. but then i think ill run into the initial problem again. the w key will just sit there unless... if i could look at some examples, i can figure it out. heres what works once then sticks:
~LAlt::
KeyWait, LAlt, U
Loop
{
Sleep, 10
GetKeyState, state, w, P
if state = U
break
Send {w Down}
}
Send {w Up}
return
~LAlt::
KeyWait, LAlt, U
Loop
{
Sleep, 10
GetKeyState, state, w, P
if state = U
break
Send {w Down}
}
Send {w Up}
return
Re: Continue Sending Key After Pressing Another
example:
works here
Code: Select all
~5 up::
Loop
{
Sleep, 500
GetKeyState, state, 4, P
if state = U
break
Send {4 }
}
return
Re: Continue Sending Key After Pressing Another
i got this to work seemingly perfect BUT, when i replace the "k" with the button i actually use "LAlt", the first time it works. then second+ tries, you get flashdance caught in loop. isnt there a way to pop out of the loop if Alt is pressed again? maybe there is something in a header that can help?
i also tried to toy with rebinding "$LAlt::k" type of things.. the game maybe doesnt like Alt...
~k up::
Loop
{
GetKeyState, state, w, P
if state = U
break
Send {w down}
}
return
i also tried to toy with rebinding "$LAlt::k" type of things.. the game maybe doesnt like Alt...
~k up::
Loop
{
GetKeyState, state, w, P
if state = U
break
Send {w down}
}
return
Re: Continue Sending Key After Pressing Another
ok got it. but when i hit the Alt key while moving forward, the function i have Ctrl bound to gets triggered. this only happens after the first press while "w" is being held. i can easily rebind this. but, it would be nice to know why this is happening. is Alt + w a shortcut for something that would cause this?
here is the "finished" script in case anyone wanted this for Fortnite.
here is the "finished" script in case anyone wanted this for Fortnite.
Code: Select all
~LAlt up::
Loop
{
sleep, 50
GetKeyState, state, LAlt, P
if state = D
break
{
GetKeyState, state, w, P
if state = U
break
Send {w down}
}
}
return
Who is online
Users browsing this forum: No registered users and 86 guests