Sign in to follow this  
Followers 0
goldenix

[solved]_Dllcall read value

9 posts in this topic

#1 ·  Posted (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 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]

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What are you talking about ? There is no such export in user32.dll ! Where did you see this ReadMessage ?

Edited by Inverted

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Well you could have asked...

http://www.autoitscript.com/forum/index.ph...mp;#entry629244

Cheers,

Brett

I 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 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]

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by Inverted

Share this post


Link to post
Share on other sites

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

You 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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0