Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[How to] Disable Screen Saver Temporarily


  • Please log in to reply
2 replies to this topic
SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
How to Disable Screen Saver Temporarily ?
http://www.autohotke...pic.php?t=86431

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.

Regards, :)

kWo4Lk1.png

tain
  • Members
  • 62 posts
  • Last active: May 21 2014 10:02 PM
  • Joined: 16 Feb 2010
Doesn't appear to work on Win 7 64bit.

For now, I'm using this as a replacement.
Run, %comspec% /c powercfg /change /monitor-timeout-ac 0  ; # is minutes, 0=never


meochain
  • Members
  • 12 posts
  • Last active: Jun 10 2012 04:25 PM
  • Joined: 10 Jun 2012
Thanks for Sharing...SKAN