Skip to content

Instantly share code, notes, and snippets.

@Prince25
Created February 6, 2023 11:46
Show Gist options
  • Save Prince25/f50c01b416584faa32f6270d91dc7664 to your computer and use it in GitHub Desktop.
Save Prince25/f50c01b416584faa32f6270d91dc7664 to your computer and use it in GitHub Desktop.
An AutoHotkey script to solve Mole Game puzzle. Directional inputs are necessary. https://steamcommunity.com/sharedfiles/filedetails/?id=2816177501
SetKeyDelay,50
Esc::
Suspend
Pause,, 1
Return
Numpad2::Reload
SolvePuzzle(char) {
Loop, Parse, char
{
; if char is U, D, L, or R, send the corresponding key
; otherwise, send the character
if (A_LoopField = "U") {
Send {Up}
} else if (A_LoopField = "D") {
Send {Down}
} else if (A_LoopField = "L") {
Send {Left}
} else if (A_LoopField = "R") {
Send {Right}
} else if (A_LoopField = " "){
}
else {
Send % A_LoopField
}
Sleep, 50
}
}
Numpad1::
SolvePuzzle("LDRRR RRRUL URUUL URULL LDDRD LDLLL UUURD RDL")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment