Нужна помощь в скрипте при зажатие "x" должна произвестить комбинация клавиш

Rtewqa

Новичок
Автор темы
1
0
Мне нужен скрипт который при зажатие "x" нажимал комбинацию клавиш с задержкой в 2 мс "w wd d ds s sa a aw" и так по кругу пока кнопка "х" не будет отжата.
Спасибо
 

dan|0

Известный
7
0
Самое просто что мог придумать, пробуй

AHK:
#Persistent
#KeyHistory, 0
SetBatchLines, -1

x::
    Loop
    {
        if !GetKeyState("x", "P")
            break

        SendInput, w
        Sleep, 2
        SendInput, {w Down}{d Down}
        Sleep, 2
        SendInput, {w Up}{d Up}
        Sleep, 2
        SendInput, d
        Sleep, 2
        SendInput, {d Down}{s Down}
        Sleep, 2
        SendInput, {d Up}{s Up}
        Sleep, 2
        SendInput, s
        Sleep, 2
        SendInput, {s Down}{a Down}
        Sleep, 2
        SendInput, {s Up}{a Up}
        Sleep, 2
        SendInput, a
        Sleep, 2
        SendInput, {a Down}{w Down}
        Sleep, 2
        SendInput, {a Up}{w Up}
        Sleep, 2
    }
return
 

SavaYT

Известный
6
0
Код:
#Persistent
SetKeyDelay, 2

x::
While GetKeyState("x", "P")
{
    Send, {w down}
    Sleep, 2
    Send, {w up}
    
    Send, {wd down}
    Sleep, 2
    Send, {wd up}
    
    Send, {d down}
    Sleep, 2
    Send, {d up}
    
    Send, {ds down}
    Sleep, 2
    Send, {ds up}
    
    Send, {s down}
    Sleep, 2
    Send, {s up}
    
    Send, {sa down}
    Sleep, 2
    Send, {sa up}
    
    Send, {a down}
    Sleep, 2
    Send, {a up}
    
    Send, {aw down}
    Sleep, 2
    Send, {aw up}
}
return

x up::
Send, {w up}{wd up}{d up}{ds up}{s up}{sa up}{a up}{aw up}
return