Last active
April 17, 2017 16:24
-
-
Save drguildo/714a4cb7a8c2647a4c1d5b3000931be4 to your computer and use it in GitHub Desktop.
An AutoHotKey program that plays the game Reigns automatically.
This file contains 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
#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. | |
#IfWinActive Reigns | |
Loop { | |
Sleep, 3000 | |
WinGetPos, , , width, height, A | |
Random, rand, 0, 1 | |
y := height / 2 | |
If rand { | |
; Swipe left | |
x := 10 | |
} Else { | |
; Swipe right | |
x := width - 10 | |
} | |
Click %x% %y% | |
Sleep, 100 | |
x := width / 2 | |
Click %x% %y% 0 | |
} | |
Return | |
#IfWinActive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment