; ============================================================ ; AntiIdleMouseJiggler.ahk ; ; Press F9 to toggle a background timer that nudges the mouse by 1 ; pixel every 60 seconds, preventing the screen from sleeping/locking ; due to inactivity. Press F9 again to turn it off. ; ; Requirements: AutoHotkey v2 (https://www.autohotkey.com/) ; ============================================================ #Requires AutoHotkey v2.0 jiggling := false F9::{ global jiggling jiggling := !jiggling if (jiggling) { SetTimer(Jiggle, 60000) ToolTip("Anti-idle: ON") } else { SetTimer(Jiggle, 0) ToolTip("Anti-idle: OFF") } SetTimer(() => ToolTip(), -1500) } Jiggle() { MouseMove(1, 0, 0, "R") MouseMove(-1, 0, 0, "R") }