Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #NoEnv SendMode, Input SetBatchLines -1 CoordMode, Mouse, Screen mouseXY(x, y) { DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) } strafe(left) { moveCount := 25 sleepInterval := 2 relativeMove := 28 if (left) { key := "d" move := relativeMove } else { key := "a" move := -relativeMove } send {%key% down} DllCall("Sleep", "UInt", 5) Loop, %moveCount% { mouseXY(move, -(move/4)) DllCall("Sleep", "UInt", sleepInterval) } send {%key% up} } $xbutton1:: while getkeystate("xbutton1","P") { strafe(true) strafe(false) } return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement