; AutoHotkey script: http://www.autohotkey.com/ ; Prevent the Screen Saver from engaging ; by periodically moving the mouse left and right by one pixel. ; ; Example: ; if (!A_IsCompiled) { SplitPath A_ScriptName,,,,scriptName Menu TRAY, Icon, %scriptName%.ico } ;;tooltip for tray icons is set below, incorporating interval minutes setting ;; could we infer the necessary interval by looking in the registry? ;RegRead ssto, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveTimeOut ;MsgBox ScreenSaveTimeOut=%ssto% pixelDelta := 1 ; default intervalMinutes := 1 ; validate # of args if 0 > 1 { MsgBox Usage: mousey [interval-in-minutes] ExitApp } ; get interval arg (ie, "Loop %0%" iterates once) Loop %0% { intervalMinutes := %A_Index% } ;MsgBox %intervalMinutes% ; validate interval arg if intervalMinutes is not number { MsgBox mousey: invalid interval argument "%intervalMinutes%", a number is required ExitApp } intervalMilli := intervalMinutes * 60 * 1000 ;MsgBox intervalMilli=%intervalMilli% ;ExitApp Menu TRAY, Tip, Mouse nudger (%intervalMinutes% min interval) Loop: Sleep %intervalMilli% MouseGetPos x, y x := x + pixelDelta MouseMove %x%, %y% pixelDelta := -pixelDelta Goto Loop