Code: Select all
#SingleInstance Force
#NoEnv
#Warn
SendMode Input
#Persistent
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 3
SetMouseDelay, -1
SetControlDelay, -1
#IfWinActive 暗黑破坏神III
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
Process, Priority, , H
SetKeyDelay, -1, -1
SetDefaultMouseSpeed, 0
SetBatchLines,-1
SetKeyDelay, 0, 100, Play ; Note that both 0 and -1 are the same in SendPlay mode.
SetMouseDelay, 100, Play
CoordMode, Mouse, Screen
~space::
While GetKeyState("space","P")
{
ControlClick, x1255 y675, 暗黑破坏神III,, Middle , 1, NA
DllCall("Sleep","UInt",200)
ControlClick, x1305 y675, 暗黑破坏神III,, Middle , 1, NA
DllCall("Sleep","UInt",200)
}
return