Alguem pode me ajuda com esse script queria adicionar as teclas w e s nesse script

Tire suas dúvidas sobre programação em AutoHotkey

Moderator: Gio

Vinizada6666
Posts: 1
Joined: 02 Feb 2023, 09:05

Alguem pode me ajuda com esse script queria adicionar as teclas w e s nesse script

Post by Vinizada6666 » 02 Feb 2023, 09:09

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#NoEnv
SendMode, Input
SetBatchLines -1
CoordMode, Mouse, Screen
mouseXY(x, y){
DllCall("mouse_event",uint,0,int,x,int,y­,uint,0,int,0)
}
strafe(left){
moveCount := 5
sleepInterval := 2	
relativeMove := 5
if(left){
key := "a"
move := -relativeMove
} else {
key := "d"
move := relativeMove
}
Send, {Blind}{%key% down}
DllCall("Sleep", "UInt", 5)
Loop, %moveCount% {
mouseXY(move, 0)
DllCall("Sleep", "UInt", sleepInterval)
}
Send, {Blind}{%key% up}
}
*XButton2::
while getkeystate("XButton2","P") {
strafe(false)
strafe(true)
}
return
[Mod edit: + [code][/code] tags.]
Last edited by gregster on 02 Feb 2023, 09:12, edited 1 time in total.
Reason: Topic moved from 'Scripts e Funções'.

Return to “Ajuda e Suporte Geral”