Created
March 2, 2012 06:48
-
-
Save ryankelley/1956317 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;========================== | |
| ;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