Skip to content

Instantly share code, notes, and snippets.

@danrouse
Created December 18, 2021 00:09
Show Gist options
  • Save danrouse/d68da17349ccc45b08563df468a4f7d5 to your computer and use it in GitHub Desktop.
Save danrouse/d68da17349ccc45b08563df468a4f7d5 to your computer and use it in GitHub Desktop.
FFXIV anti-idle AHK script
#NoEnv
#SingleInstance force
SendMode Input
CoordMode, ToolTip, Screen
InputBox, Delay, FFXIV Anti-Idle, Enter a number of seconds between anti-idle inputs:,,190,144,,,,,60
If ErrorLevel {
Exit
}
ToolTip, Anti-Idle OFF, 0, 0
MsgBox, Press F5 to toggle FFXIV Anti-Idle.
IsActive := false
InputCounter := 1
Delay := Delay * 1000
WindowName = FINAL FANTASY XIV
F5::
{
IsActive := !IsActive
if IsActive {
ToolTip, Anti-Idle ON, 0, 0
SetTimer, InputLoop, %Delay%
} else {
ToolTip, Anti-Idle OFF, 0, 0
SetTimer, InputLoop, Off
}
}
InputLoop:
Random, PressTime, 10, 100
KeyToPress = w
if mod(InputCounter, 2) = 0 {
KeyToPress = s
}
ControlSend,, {%KeyToPress% DOWN}, %WindowName%
Sleep, %PressTime%
ControlSend,, {%KeyToPress% UP}, %WindowName%
InputCounter := InputCounter + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment