This AutoIT tool every 30 seconds recognize if your Windows machine is inactive (any mouse or keyboard activities) and move mouse by 1 pixel to left and right.

#cs ----------------------------------------------------------------------------
 AutoIt Version: 3.3.14.2
 Author:         Arkadiusz Mastalerz
#ce ----------------------------------------------------------------------------

Do
   Sleep(30 * 1000); 30sec
   $idleTime = _Timer_GetIdleTime()
   If $idleTime > 0 Then
     MouseMove(MouseGetPos(0),MouseGetPos(1)+1)
     MouseMove(MouseGetPos(0),MouseGetPos(1)-1)
   EndIf
Until $idleTime < 0


;----------------------------------------------------------------------------
; Name: _Timer_GetIdleTime()
; Description: Returns the number of ticks since last user activity (i.e. KYBD/Mouse)
; Syntax: _Timer_GetIdleTime()
; Parameters: None
; Return values: Success - integer ticks since last (approx. milliseconds) since last activity
;    Failure - Sets @extended = 1 if rollover occurs (see remarks)
; Remarks: The current ticks since last system restart will roll over to 0 every 50 days or so,
;    which makes it possible for last user activity to be before the rollover, but run time
;    of this function to be after the rollover.  If this happens, @extended = 1 and the
;    returned value is ticks since rollover occured.
;----------------------------------------------------------------------------
Func _Timer_GetIdleTime()
; Get ticks at last activity
  Local $tStruct = DllStructCreate("uint;dword");
  DllStructSetData($tStruct, 1, DllStructGetSize($tStruct));
  DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($tStruct))

; Get current ticks since last restart
  Local $avTicks = DllCall("Kernel32.dll", "int", "GetTickCount")

; Return time since last activity, in ticks (approx milliseconds)
  Local $iDiff = $avTicks[0] - DllStructGetData($tStruct, 2)
  If $iDiff >= 0 Then
  ; Normal return
    Return $iDiff
  Else
  ; Rollover of ticks counter has occured
    Return SetError(0, 1, $avTicks[0])
  EndIf
 EndFunc  ;==>_Timer_GetIdleTime