AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Turn Monitor Off and keep off until hotkey pressed

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
guest101
Guest





PostPosted: Sun Jan 10, 2010 10:55 am    Post subject: Turn Monitor Off and keep off until hotkey pressed Reply with quote

in ahk you can use this to turn monitor off:
SendMessage 0x112, 0xF170, 1,,Program Manager

but is there any way to keep monitor off until a hotkey is pressed? (as opposed to just any key or mouse movement)

thanks
Back to top
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Sun Jan 10, 2010 12:29 pm    Post subject: Reply with quote

It seems not. Windows intercepts the key before AHK does. I tried this code with no success:
Code:
   BlockInput, On
   SendMessage 0x112, 0xF170, 1,,Program Manager
return
(PS: Ctrl-Alt-Del unblocks it)
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Sun Jan 10, 2010 5:15 pm    Post subject: Reply with quote

You could loop it so it keeps sending monitor off comands. So if it wakes up it goes right back to sleep.
If not you could use the hotkey on the fornt of your monitor then it stays off untill pressed again. Very Happy
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Mon Jan 11, 2010 5:14 am    Post subject: Reply with quote

Code:
F1::SetTimer, IdleCheck, 500
F2::SetTimer, IdleCheck, Off

IdleCheck:
If(A_TimeIdle<500)
SendMessage,0x112,0xF170,2,,Program Manager
Return

Only sends monitor off when needed
F1 monitor Off
F2 monitor On
On my CRT Sad the screen doesen't come completly on before being shut down again.
Back to top
View user's profile Send private message
svi



Joined: 09 Oct 2006
Posts: 236
Location: Finland

PostPosted: Mon Jan 11, 2010 4:49 pm    Post subject: Reply with quote

None, your script works with Cathode Ray Tubes, because for them it takes time to warm up, so there's no flash when it's turned on for mostly half second.
I have a laptop with CRT, so I can't test it on LCD/TFT, but I think they're too fast to be kept off with a reasonable timer interval.
_________________
Pekka Vartto
Back to top
View user's profile Send private message
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Mon Jan 11, 2010 4:58 pm    Post subject: Reply with quote

It also stays off on a LCD I have access to. But it occasionally flashes no signal.
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Mon Jan 11, 2010 5:11 pm    Post subject: Reply with quote

Have a look here, as far as I remember it was quite acceptable.
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
jonj99



Joined: 03 Jan 2009
Posts: 24

PostPosted: Tue Jan 12, 2010 3:05 am    Post subject: Reply with quote

this was a problem for me too. for me the situation was with a laptop i frequently want to play music while i take a nap and want the screen off. it was too sensitive to not keep 'waking back up' the monitor.

so i ended up just connecting a monitor cable to fool the laptop into thinking there is an external monitor. then just a hotkey to switch the laptop back and forth from normal to external monitor only.

just an idea to consider.
Back to top
View user's profile Send private message
goblinhan
Guest





PostPosted: Sun Nov 14, 2010 7:21 pm    Post subject: Reply with quote

me too, I've the same problem:( I'd like to listen music on my laptop when LCD off. Unfortunately When I want to volume up,down or mute, I have to turn on lcd:\
I have written a message to microsoft forum for uncontrolled wake up problem of windows XP. When The answer is come, I write here.
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group