As is, when opened, it toggles the screen saver on or off.

I'd like to know how to change it so when opened, it displays a message box showing the current value while offering a couple choices, "Ok" to toggle it and "Cancel".

The Script:

Const HKCU = &H80000001
Set oReg=GetObject("winmgmts:!root/default:StdRegProv")
oReg.GetStringValue HKCU,"control panel\desktop","ScreenSaveActive",screensaveractive
Select case screensaveractive
case "1″
screensaveractive = "0″
oReg.SetStringValue HKCU,"control panel\desktop","ScreenSaveActive",screensaveractive
msgbox "Disabled",vbinformation,"Screen Saver Switch"
Case "0″
screensaveractive = "1″
oReg.SetStringValue HKCU,"control panel\desktop","ScreenSaveActive",screensaveractive
msgbox "Enabled",vbinformation,"Screen Saver Switch"
End Select

Posted 6 years ago
Top