I've tried this and it doesn't work.
(im new to this)
Code: Select all
#if GetKeyState("Shift", "P")
a::
d::return
#if
Code: Select all
#if GetKeyState("Shift", "P")
a::
d::return
#if
Code: Select all
$a::
$d::
hk := SubStr(A_ThisHotkey, 0)
While GetKeyState(hk, "P") {
Send % GetKeyState("Shift") ? "" : hk
Sleep, 25
}
Return
tried it but its like its acting as if im not holding down a or d anymore but just inputting a lot of a's and d's.mikeyww wrote: ↑19 Apr 2021, 22:33Code: Select all
$a:: $d:: hk := SubStr(A_ThisHotkey, 0) While GetKeyState(hk, "P") { Send % GetKeyState("Shift") ? "" : hk Sleep, 25 } Return
Code: Select all
~Shift Up::Send % GetKeyState("a", "P") ? "{a up}{a down}" : ""
the first script works in notepad. I'm trying to get this to work for a game where it would help me prevent accidentally move right or left while holding down the shift key.mikeyww wrote: ↑20 Apr 2021, 05:15You can try something like the following, though I do not have a way to test in your program (especially since I don't know what program it is).
Does the first script work in Notepad?Code: Select all
~Shift Up::Send % GetKeyState("a", "P") ? "{a up}{a down}" : ""