Aassdd Posted January 28, 2008 Share Posted January 28, 2008 Is there any command to launch the screensaver? Link to comment Share on other sites More sharing options...
weaponx Posted January 28, 2008 Share Posted January 28, 2008 There was an example posted today...http://www.autoitscript.com/forum/index.ph...;hl=screensaverNext time use the search first because this is elementary. Link to comment Share on other sites More sharing options...
Aassdd Posted January 28, 2008 Author Share Posted January 28, 2008 I did a search few days ago but didn't have time to make a post, that's why I didn't see it. Sorry Link to comment Share on other sites More sharing options...
Aassdd Posted January 29, 2008 Author Share Posted January 29, 2008 Are there any commands for the monitor? Link to comment Share on other sites More sharing options...
Squirrely1 Posted January 29, 2008 Share Posted January 29, 2008 (edited) Are there any commands for the monitor?I was writing a screeensaver and I was hoping it would support those using more than one monitor. I couldn't test their scripts because I only have one monitor. But if you search the forum this way:+screensaver +dual +monitoryou should find where someone is working on a way to get your screensaver script to recognize multiple monitors.But if you are looking for a way to just turn off a monitor programmatically, someone else even found a way to do that - it's on the forums somewhere. Edited January 29, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
Aassdd Posted January 29, 2008 Author Share Posted January 29, 2008 I want to set the monitor in sleep mode (when no keys are pressed for around 1 hour) but I can't find anything. Link to comment Share on other sites More sharing options...
Squirrely1 Posted January 29, 2008 Share Posted January 29, 2008 (edited) The usual way of doing this is using Control Panel > Power Options > Turn off monitor dropdown set to 1 hour, but you could use Control Panel > Display Properties > Screensaver tab > use "Blank" screensaver and set timeout. To turn off the monitor programmatically, the following function has been available for several months, here on the AutoIt forums. This is my version. Turns off the monitor by default, but as it happens, the monitor comes back on upon user input - keyboard or mouse. There is probably a way, using WMI or something, to make this function work on multi-monitor setups: #region test_harness _MonitorToggle() #endregion Func _MonitorToggle($OnOff = 0) ; Turns off the monitor by default, but as it happens, monitor comes back on upon user input - keyboard or mouse Local $opt = Opt("WinTitleMatchMode", 4) Local $opt Local $hWnd Local $Param Local $SC_MonitorPower Local $WM_SYSCommand If $OnOff = 0 Then $Param = 2 Else $Param = -1 EndIf $hWnd = WinGetHandle("classname=Progman") $WM_SYSCommand = 274 $SC_MonitorPower = 61808 DllCall("user32.dll", "int", "SendMessage", "hwnd", $hWnd, _ "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Param) Opt("WinTitleMatchMode", $opt) EndFunc;==>_MonitorToggle I think Valik or one of the other developers wrote it - Thanks guys! Edited January 29, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now