Skip to content

Instantly share code, notes, and snippets.

@woctezuma
Last active August 2, 2024 13:19
Show Gist options
  • Save woctezuma/63c94bf9754e504a7778235c0ef0dad1 to your computer and use it in GitHub Desktop.
Save woctezuma/63c94bf9754e504a7778235c0ef0dad1 to your computer and use it in GitHub Desktop.
Remap controls for rowing and fencing in the videogame "Olympics Go: Paris 2024"
#Requires AutoHotkey v2.0
#SuspendExempt
F12::Suspend
#SuspendExempt False
; Rowing
a::{ ; Input: press <A>
Loop 10 ; Output: press <Space> 10 times
{
Send("{Space}")
Sleep 10
}
}
; Fencing
Up::{ ; Input: press or hold <Up>
If KeyWait("Up", "T.01") ; Output: either left-click at a position
Send("{Click 1700 700}")
else { ; Output: or hold the left-button at a position
Send("{Click 1700 700 0}")
SendEvent("{LButton down}")
KeyWait("Up")
SendEvent("{LButton up}")
}
}
Down::{ ; Input: press or hold <Down>
If KeyWait("Down", "T.01") ; Output: either left-click at a position
Send("{Click 1700 900}")
else { ; Output: or hold the left-button at a position
Send("{Click 1700 900 0}")
SendEvent("{LButton down}")
KeyWait("Down")
SendEvent("{LButton up}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment