Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mojotx/40a30925d9a44ec3e6d9cde8d902474a to your computer and use it in GitHub Desktop.
Save mojotx/40a30925d9a44ec3e6d9cde8d902474a to your computer and use it in GitHub Desktop.
NoSleep.exe - Prevents Screensaver and PC Locking - By Mike.Langford
# original URL: https://www.symantec.com/connect/downloads/readynosleepexe-prevents-screensaver-and-pc-locking
#AutoIt3Wrapper_icon=nosleep.ico
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1)
$AboutItem = TrayCreateItem("About")
TrayItemSetOnEvent(-1,"ReadList")
TrayCreateItem("")
$ExitItem = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1,"ReadList")
Func ReadList()
$SelectedItem = TrayItemGetText(@TRAY_ID)
If $SelectedItem="Exit" Then
Exit
ElseIf $SelectedItem="About" Then
Call("About")
EndIf
EndFunc
Func About()
MsgBox(064,"No Sleep Utility","Prevents your computer from automatically locking or going to screen saver as it normally would." & @CRLF & "Copyright Mike Langford ©2009")
EndFunc
While 1
Sleep(30000)
$CurPos = MouseGetPos ( )
MouseMove ( $CurPos[0] + 1, $CurPos[1] )
MouseMove ( $CurPos[0], $CurPos[1] )
WEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment