goldenix Posted February 15, 2009 Share Posted February 15, 2009 (edited) I want to retrive this value: $lciPower_On . It shows whether the monitor is on or off. Global $lciWM_SYSCommand Global $lciSC_MonitorPower Global $lciPower_On Global $Progman_hwnd = WinGetHandle('[CLASS:Progman]') DllCall('user32.dll', 'int', 'ReadMessage', _ 'hwnd', $Progman_hwnd, _ 'int', $lciWM_SYSCommand, _ 'int', $lciSC_MonitorPower, _ 'int', $lciPower_On) ConsoleWrite($lciPower_On & @CRLF) EDIT This is not solvable.: I don't think there is a reliable way to do this, AutoIt or not. I've searched all over. There is a function called GetDevicePowerState in Kernel32.dll, but it says "This function cannot be used to query the power state of a display device.": http://msdn.microsoft.com/en-us/library/aa372690(VS.85).aspx Edited February 15, 2009 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
BrettF Posted February 15, 2009 Share Posted February 15, 2009 I don't see ReadMessage anywhere on MSDN for user32.dll. Or is that just me? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
goldenix Posted February 15, 2009 Author Share Posted February 15, 2009 I don't see ReadMessage anywhere on MSDN for user32.dll.Or is that just me?I do not know what will happen if I will change the readmessage to sendmessage maybe it will erase all previous data. Im scared.So it is not possible to retrive $lciPower_On state? really? My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Inverted Posted February 15, 2009 Share Posted February 15, 2009 (edited) What are you talking about ? There is no such export in user32.dll ! Where did you see this ReadMessage ? Edited February 15, 2009 by Inverted Link to comment Share on other sites More sharing options...
goldenix Posted February 15, 2009 Author Share Posted February 15, 2009 What are you talking about ? There is no such export in user32.dll ! Where did you see this ReadMessage ?ReadMessage -I thought if there is a sendmessage, maybe there is also a readmessage.I want to know if my monitor is turned on or off. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
BrettF Posted February 15, 2009 Share Posted February 15, 2009 Well you could have asked...http://www.autoitscript.com/forum/index.ph...mp;#entry629244Cheers,Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
goldenix Posted February 15, 2009 Author Share Posted February 15, 2009 (edited) Well you could have asked... http://www.autoitscript.com/forum/index.ph...mp;#entry629244 Cheers, BrettI dont think this code is any use at all, no mater whether the monitor is turned on or off it always outputs following message: Plug and Play Monitor Moniter Name = Plug and Play Monitor Moniter State = 3 Moniter State Meaning: - Running or Full Power Plug and Play Monitor Default Monitor Moniter Name = Default Monitor Moniter State = 8 Moniter State Meaning: - Running or Full Power - Off Line PS: I don't think there is a reliable way to do this, AutoIt or not. I've searched all over. is what one of the MVP said. Stupid windows.... Edited February 15, 2009 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Inverted Posted February 15, 2009 Share Posted February 15, 2009 (edited) How can windows detect if the monitor is turned on or off ? Next, you'll make a thread about detecting if the speakers are turned on and on which volume. This is MADNESS !!! lol Edited February 15, 2009 by Inverted Link to comment Share on other sites More sharing options...
goldenix Posted February 15, 2009 Author Share Posted February 15, 2009 How can windows detect if the monitor is turned on or off ? Next, you'll make a thread about detecting if the speakers are turned on and on which volume. This is MADNESS !!! lolYou can turn on & off monitor with short autoit dllcall, then it would be natural to assume, that there is a way to check if monitor is on or off. But it seems, it is not possible. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] 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