Code: Select all
+space::
Loop
{
if not GetKeyState("space", "P")
break
SendInput {space down}
Sleep, 10
SendInput {space up}
}
return
Code: Select all
+space::
Loop
{
if not GetKeyState("space", "P")
break
SendInput {space down}
Sleep, 10
SendInput {space up}
}
return
Code: Select all
$+Space::
While GetKeyState("Space", "P")
Send {Space}
Return
this not working. this script just spam shift+space. im need when i hold Shift+space spam ONLY space. and when i hold only space spam only space)mikeyww wrote: ↑19 Jan 2022, 07:35Welcome to this AutoHotkey forum!
Code: Select all
$+Space:: While GetKeyState("Space", "P") Send {Space} Return
Code: Select all
$Space::
$+Space::
Send {Blind}{Shift up}{RShift up}
While GetKeyState("Space", "P")
Send {Space}
Return
when I hold space for a long time and then release it, he presses shift many times. I don't know if I have a problem. In any case, thank you very much. But it still doesn't work as it should. Even with a short press on space, shift is pressed. I do not need it.mikeyww wrote: ↑19 Jan 2022, 07:58Code: Select all
$Space:: $+Space:: Send {Blind}{Shift up}{RShift up} While GetKeyState("Space", "P") Send {Space} Return
Code: Select all
$Space::
$+Space::
Send {Blind}{Shift up}{RShift up}
While GetKeyState("Space", "P")
Send {Space}
KeyWait, Shift
SoundBeep, 1000
Return
How did you check it in notepad?mikeyww wrote: ↑19 Jan 2022, 08:20When I tried this in Notepad and then examined the KeyHistory, that is not what I found. Shift was not pressed at any time. In any case, others may have some better scripts or ideas for you. Best wishes.
It's hard to understand if my message is being moderated, or it hasn't even been sent...mikeyww wrote: ↑19 Jan 2022, 08:20Code: Select all
$Space:: $+Space:: Send {Blind}{Shift up}{RShift up} While GetKeyState("Space", "P") Send {Space} KeyWait, Shift SoundBeep, 1000 Return
An additional option for you is below.Even with a short press on space, shift is pressed. I do not need it.
Code: Select all
$Space::
$+Space::
While GetKeyState("Space", "P")
Send {Blind}{Space}
KeyWait, Shift
SoundBeep, 1000
Return