jeffharbert icon

Move cursor one pixel to keep your PC awake

jeffharbert | PRO | 09/30/22 01:31:40 PM UTC | 0 ⭐ | 11608 👁️ | Never ⏰ | []
Autohotkey |

650 B

|

Software

|

0 👍

/

0 👎

;--- SETTINGS -----------------------------------------------------------------
distance_x_px := 1
check_interval_secs := 60
minimum_idle_mins := 5
 
;--- MAIN LOOP ----------------------------------------------------------------
; If the user has been idle for 2.5 minutes time this script moves
; the mouse pointer left and right by distance_x_px in regular intervals
;
movement_x := distance_x_px
check_interval_millis := check_interval_secs * 1000
minimum_idle_millis := minimum_idle_mins * 30000
 
Loop {
        Sleep, 30000
        if (A_TimeIdle > minimum_idle_millis) {
        movement_x := -1 * movement_x
        MouseMove, %movement_x%, 0, 0, R
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎