Jump to content

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

How to trigger Power Management to switch off Display(s)?


  • Please log in to reply
26 replies to this topic
Dan____
  • Guests
  • Last active:
  • Joined: --
Is there any way to do this in Vista? These commands seem to do nothing in Vista (32bit).

Bigrob55
  • Guests
  • Last active:
  • Joined: --
5::
KeyWait, 5
SendMessage, 0x112, 0xF170, 2,, Program Manager
; Note for the above: Use -1 in place of 2 to turn the monitor on. 
; Use 1 in place of 2 to activate the monitor's low-power mode.
return


end::Suspend

esc::exitapp

The reason i used keywait, just as used some used sleep 1000 above, is so the hotkey of 5 in this case, doesn't trigger the computer to come out of standy by.

Works like a charm. 8)

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

Is there any way to do this in Vista? These commands seem to do nothing in Vista (32bit).

SendMessage, 0x112, 0xF170, 2,, Program Manager
...works fine for me; Vista 32-bit.

Maybe[*:3u4av6xo]You've assigned it to a hotkey and the key-release is interfering (use KeyWait), or
[*:3u4av6xo]You're on a non-English version of Vista and "Program Manager" is not the correct title (or maybe it is, I don't know.) Try ahk_class Progman instead.

totalz
  • Members
  • 1 posts
  • Last active: Jun 13 2008 01:14 AM
  • Joined: 13 Jun 2008
Is it possible to choose which monitor I want to standby if I have more than 1? Say I'm watching movie with one of the monitors and want to put the others in standby.

thanks 1st

awannaknow
  • Guests
  • Last active:
  • Joined: --
Hi,
In a desperate run to improve skills and reach indepedance day I wonder how you get to find "things" such as :
"112, 0xF170"
or
"112, 0xF140"
and what does it means ?

Mmmm???? !!!! :?

awannaknow
  • Members
  • 372 posts
  • Last active: Mar 03 2019 05:18 AM
  • Joined: 14 Jun 2009
And I must add, where should I start ?
For example : "Read the manual" ?
:!: :?: :!: :?: :!: :?: :?

awannaknow
  • Members
  • 372 posts
  • Last active: Mar 03 2019 05:18 AM
  • Joined: 14 Jun 2009
And an other one , sorry it comes one by one,
(serial mode :oops: ),
How to define AutoHotKey : is it programming, automating, etc.. ?

A few weeks ago I asked in a runtime revolution forum (its like visual basic, but more simple to learn) if it was possible to start xp program installation window and make it push this button, and choose that combobox, etc...
They replied its possible to use vbscript or windows script to do it but better use AutoHotKey or autoit.

I asked if VB could do it, they answered same as runtime revolution.
I said I was really surprised that what an automation (supposed to be) tool can do a more sophisticated (anyway supposed to be more difficult to learn) programming tool cannot do.

How come ?
And this I really have some difficult time to grasp...
:!: :?: :!: :?: :!: :?: :oops:

Zeos
  • Members
  • 17 posts
  • Last active: Oct 11 2011 06:25 AM
  • Joined: 28 May 2009
It wouldnt hurt if this script disabled mouse movement while the monitor is sleeping. That way only a keypress would wake it.

lilalurl.T32
  • Members
  • 391 posts
  • Last active: Jul 05 2011 03:39 PM
  • Joined: 17 May 2007

Hi,
In a desperate run to improve skills and reach indepedance day I wonder how you get to find "things" such as :
"112, 0xF170"
or
"112, 0xF140"
and what does it means ?

Mmmm???? !!!! :?



Either 'general' knowledge available online (MSDN, documentation on programs etc...) or by using Winspector.
http://www.autohotke...pic.php?t=40112

And I must add, where should I start ?
For example : "Read the manual" ?


Would be a very good idea, notably the tutorial/quick start.
You could also, if you have a bit of time, try and browse the 'scripts and functions' forum to get an idea of things that can be done with AHK (there is also a shorter list in the help file in 'scripts showcase').

As for more info. on WM_COMMANDS, check SendMessage/PostMessage and Message list in the help file.
________
NEW JERSEY DISPENSARIES

awannaknow
  • Members
  • 372 posts
  • Last active: Mar 03 2019 05:18 AM
  • Joined: 14 Jun 2009
Thank you lilalurl.T32,

I'll follow your path.
You saved me a lot of time searching the forum.
It's often time constraint which urge questionning.
Althought I spent today readings posts from your links... :oops:

Apology for members for parasiting this thread, I just realized that fact now that I re-read it.

Btw, nobody bashed or flamed me (yet? :lol: ).
Which I much appreciated.
Nobody's perfect.
I just proved it today.
:wink:
Oh, and an other thing :
Now that I have the answer (about "112, 0xF140" thing), I realize it was a one more dumb question : apology too for this... :oops:
I'll spend a lot of my time to learn now and I'll only come back with brilliant questions ... and answers.
I swear. :wink:

Sinel
  • Guests
  • Last active:
  • Joined: --
Does anyone found a way to turn monitor off that way, that to turn on display you must use specific key (not any key or mouse move)?

mesab0ogie
  • Guests
  • Last active:
  • Joined: --
i found a very very simple way of doing this. juz add Blockinput to your command line to turn off the monitor. so when u turn off the monitor, Blockinput initiates as well. To cancel, juz press ctrl+alt+del. works like a charm