Skip to content

Instantly share code, notes, and snippets.

@ryankelley
Created March 2, 2012 06:48
Show Gist options
  • Select an option

  • Save ryankelley/1956317 to your computer and use it in GitHub Desktop.

Select an option

Save ryankelley/1956317 to your computer and use it in GitHub Desktop.
;==========================
;Initialise
;==========================
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
IsInSTMode := false
SetSTMode(false)
;==========================
;Functions
;==========================
SetSTMode(toActive) {
local state := toActive ? "ON" : "OFF"
;msgbox mode is %IsInSTMode%, input was is %toActive%
IsInSTMode := toActive
;msgbox mode is now %IsInSTMode%
;ExecuteSTMacro()
}
ExecuteSTMacro() {
global IsInSTMode
while IsInSTMode
{
Loop, 15
{
Send, {space}
sleep, 200
}
MouseClick, right, 826, 502
sleep, 500
MouseClick, left, 605,625
sleep, 500
MouseClick, left, 546,623
}
}
#ifWinActive RIFT
{
#z::
SetSTMode(!(IsInSTMode))
ExecuteSTMacro()
return
#x::
SetSTMode(false)
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment