Fudge26

No-Sleep-MK8

Dec 20th, 2018 (edited)
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.69 KB | None | 0 0
  1. #include <ColorConstants.au3>
  2. #include <Timers.au3>
  3. #include <MsgBoxConstants.au3>
  4. #include <AutoItConstants.au3>
  5. #include <Constants.au3>
  6. #include <DirConstants.au3>
  7. #include <FontConstants.au3>
  8. #include <GUIConstantsEx.au3>
  9. #include <InetConstants.au3>
  10. #include <MsgBoxConstants.au3>
  11. #include <FileConstants.au3>
  12. #include <StringConstants.au3>
  13. #include <WindowsConstants.au3>
  14. #NoTrayIcon
  15.  
  16. $InactivityTrigger = 180000 ;inactive for 3 minutes: 180000
  17.  
  18. Opt("TrayIconHide", 1)
  19.  
  20. While True
  21.  
  22.    $InactiveFor = _Timer_GetIdleTime()
  23.  
  24.    If $InactiveFor >= $InactivityTrigger Then
  25.  
  26.       Send("LSHIFT" + "F12") ;Press Shift + F12 = F24
  27.  
  28.    EndIf
  29.  
  30.    Sleep(10000) ;Wait 10 seconds
  31.  
  32. Wend
Advertisement