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

Rtewqa

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

dan|0

Известный
4
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