DisableScreenSaver.ahk will keep Screen Saver disabled until the script is exited.
Even if an another utility sets the Screen Saver active, this script will disable it immediately.
;DisableScreenSaver.ahk #Persistent Menu, Tray, Icon, User32.dll, 4 Menu, Tray, Tip, Screen Saver Disabled !!! OnExit, ScreenSaveActivate DllCall("SystemParametersInfo", Int,17, Int,0, UInt,NULL, Int,2) SetTimer, CheckScreenSaveActive, 999 Return CheckScreenSaveActive: DllCall("SystemParametersInfo", Int,16, UInt,NULL, "UInt *",SSACTIVE, Int,0) If SSACTIVE DllCall("SystemParametersInfo", Int,17, Int,0, UInt,NULL, Int,2) Return ScreenSaveActivate: DllCall("SystemParametersInfo", Int,17, Int,1, UInt,NULL, Int,2) ExitApp Return
How to test this script:
Run this script and check the Screen Saver tab in Display Properties.
It will be (None) when this script is running. Change it to any available Screen Saver. Now close
& re-open Display Properties and tab to Screen Saver. It would have been reset to (None).
Credit: Adapted from C++ source code of DisableScreenSaver. Visit the Webpage.