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 

Send desktop to TV

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
mfgarcia



Joined: 05 May 2008
Posts: 2
Location: Lisbon, Portugal

PostPosted: Mon May 05, 2008 2:51 am    Post subject: Send desktop to TV Reply with quote

Hi guys,

I'm a newbie at ahk. So I'm a little confused about all this scrip stuff (too much information Confused).

I need your help at an automated action on my laptop: every time I plug my TV to the laptop I need to press the keys FN + F5 (my laptop is a toshiba and FN is a special key).

I'd like a solution that automatically send my laptop image to the TV when I plug the cable. But I'd also be happy if that happens by pressing one single key.

TIA
BR
Back to top
View user's profile Send private message
Ian



Joined: 15 Jul 2007
Posts: 1157
Location: Enterprise, Alabama

PostPosted: Mon May 05, 2008 3:01 am    Post subject: Reply with quote

Code:
F1::
Send, {vkFFsc163}F5
return


I dunno if that will work.
_________________
ScriptPad/~dieom/dieom/izwian2k7/Trikster/God

Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 1128

PostPosted: Mon May 05, 2008 3:29 am    Post subject: Reply with quote

Typically, the [Fn]+[F#] key combos on a laptop are not picked up by AHK because they tell don't trigger the usual "keyboard" type message.

Fn+F5 (enable secondary display) sends a message directly to the process 'program manager' telling it to enable the laptop's external monitor plug. (I think that's how it works anyways)

You can try browsing M$DN to find out what exactly that message is (then AHK can use it with SendMessage) " http://msdn.microsoft.com/en-us/library/ms533235(VS.85).aspx "

And also the registry HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\VIDEO\Device\Video2 seems like it might be involved.

btw: is it really so much trouble to press 2 keys at once?
_________________
My Home Thread
More Common Answers: 1. It's in the FAQ 2. Ternary ( ? : ) guide 3. Post code with [code][/code] tags
Back to top
View user's profile Send private message
poetbox



Joined: 07 Jan 2007
Posts: 59

PostPosted: Mon May 05, 2008 5:07 am    Post subject: Reply with quote

[VxE] wrote:
Typically, the [Fn]+[F#] key combos on a laptop are not picked up by AHK because they tell don't trigger the usual "keyboard" type message.
Laughing
And also the registry HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\VIDEO\Device\Video2 seems like it might be involved.

btw: is it really so much trouble to press 2 keys at once?

1)For a person who was accustomed to operate computer by one hand especially one finger,it does useful.
Laughing Because 1<2,obviously the specific energy consumption is less.
2)To do more things than only to press [Fn]+[F#].After the pressing maybe AHK can do something more, then it'll impossible to avoid.
All in all their idea is correct. Cool Shocked
Back to top
View user's profile Send private message
mfgarcia



Joined: 05 May 2008
Posts: 2
Location: Lisbon, Portugal

PostPosted: Tue May 06, 2008 12:20 am    Post subject: Reply with quote

[VxE] wrote:

btw: is it really so much trouble to press 2 keys at once?


Laughing no, it is'nt! but btw, is'nt this the purpose of "ahk"..automate actions?
I'm just messing with you Wink , i'll try to investigate your thoughts and many thanks for your quick reply.

[Ian] wrote:

F1::
Send, {vkFFsc163}F5
return


Thanks for you quick reply, this script works when I press F1, right? If it is, not working Crying or Very sad

Cheers
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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