Forked from iamzhout/gist:38ad08d2d8eacda8184f0766639641a5
Created
March 10, 2018 23:20
-
-
Save mojotx/40a30925d9a44ec3e6d9cde8d902474a to your computer and use it in GitHub Desktop.
NoSleep.exe - Prevents Screensaver and PC Locking - By Mike.Langford
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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