TIL about AutoHotKey
POSTED ON:
TAGS: automation gaming
In a game I was playing, it was getting super annoying to:
- press up
- Buy an item (you could only buy one)
- wait 5 seconds for the animation
- repeat it 1000 more times.
I discovered this: AutoHotKey
Powerful. Easy to learn.
The ultimate automation scripting language for Windows.
So what you do is you write a script that fires keystrokes.
You then open your script in AutoHotkey, and then fire the 'activator' key.
Here's the script I found:
Filename: dangaronpa-autobuy.ahk
#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.
~CapsLock::
{
loop
{
if GetKeyState("CapsLock", "T")
{
Send {Down down}
Send {Return down}
Sleep, 100
Send {Return up}
Send {Down up}
Sleep, 7000
}
else
{
Break
}
}
}
return
How to use:
- I run the script in AutoHotkey
- When I press CapsLock...
- It loops through that event.
- It'll send down, hit the action, sleep, repeat.
Reference - Danganronpa guide by n4f
Related TILs
Tagged: automation