Your Button::
Send {Space Down}
Sleep 17
Send {Space Up}
Sleep 17
Send {D Down}
Sleep 1
Send {RButton Down}
Sleep 450
Send {Space Down}
Sleep 17
Send {Space Up}
Sleep 17
Send {D Up}
Sleep 17
Send {RButton Up}
Return
Your Button::
Send {Space down}
Sleep 17
Send {Space up}
Sleep 17
Send {d down}
Sleep 17
Send {Space down}
Sleep 17
Send {d up}
Sleep 17
Send {Space up}
Sleep 1
Send {RButton down}
Sleep 450
Send {RButton up}
Return
#InstallMouseHook
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , H
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
if not A_IsAdmin
{
MsgBox, You are running this script with no administrator rights. It may not work.
}
$*MButton::
;ensuring that the player doesn't interfere with the macro
Send {SC011 Up} ;W
Send {SC01E Up} ;A
Send {SC01F Up} ;S
Send {SC020 Up} ;D
;the actual inputs
Send {Space Down}
DllCall("kernel32.dll\Sleep", "UInt", 16.5)
Send {2 Down}
Send {Click Right Down}
Send {Space Up}
DllCall("kernel32.dll\Sleep", "UInt", 16.5)
Send {2 Up}
Send {SC020 Down}
Send {Space Down}
DllCall("kernel32.dll\Sleep", "UInt", 16.5)
Send {Space Up}
Send {SC020 Up}
;ensuring that the macro doesn't interfere with the player
if GetKeyState("SC011","P")
Send {SC011 Down}
if GetKeyState("SC01E","P")
Send {SC01E Down}
if GetKeyState("SC01F","P")
Send {SC01F Down}
if GetKeyState("SC020","P")
Send {SC020 Down}
DllCall("kernel32.dll\Sleep", "UInt", 350)
if GetKeyState("RButton","P")
Send {Click Right Down}
else
Send {Click Right Up}
return
$*Ins::Suspend