A lightweight AutoHotkey script to deal with AFK timers.
Supports unfocused windows in addition to multiple processes!
Make sure to install AutoHotkey if you haven't already.
Open Anti-AFK in a text editor to access its config - each setting has a description.
You will need to add your target process into the PROCESS_LIST
for it to be monitored.
Refer to the script's comments for a more detailed overview.
- Windows belonging to monitored processes are identified.
- These windows are tracked for
WINDOW_TIMEOUT
minutes of inactivity. - Keystrokes are sent to reset any potential AFK timers.
- This repeats every
TASK_INTERVAL
minutes for each inactive window. - Background windows are briefly made transparent and foregrounded.
- This repeats every
You can use a utility called Window Spy
, which is bundled with AutoHotkey.
Right-click on the SysTray icon of any AutoHotKey script and select Window Spy.
Then, hover over a window belonging to the process and note the ahk_exe
value.
This heavily depends on the program you intend to use it on.
AutoHotkey makes no attempt to hide itself: be careful if macros are blacklisted!