#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. #SingleInstance force ; Replaces the old instance !k:: Loop, 5 { Click, right ; Toggles the lever on Sleep, % a_index * 50 ; Each loop increases the delay by 1/20th of a second (0.005 sec) Send, #{PrintScreen} ; Take screenshot Sleep, 1000 ; Wait 1 sec for screenshot to save Click, right ; Toggles the lever off Sleep, % a_index * 50 ; Each loop increases the delay by 1/20th of a second (0.005 sec) Send, #{PrintScreen} ; Take screenshot Sleep, 1000 ; Wait 1 sec for screenshot to save } Return