| View previous topic :: View next topic |
| Author |
Message |
mfgarcia
Joined: 05 May 2008 Posts: 2 Location: Lisbon, Portugal
|
Posted: Mon May 05, 2008 2:51 am Post subject: Send desktop to TV |
|
|
Hi guys,
I'm a newbie at ahk. So I'm a little confused about all this scrip stuff (too much information ).
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 |
|
 |
Ian
Joined: 15 Jul 2007 Posts: 1157 Location: Enterprise, Alabama
|
Posted: Mon May 05, 2008 3:01 am Post subject: |
|
|
| Code: | F1::
Send, {vkFFsc163}F5
return |
I dunno if that will work. _________________ ScriptPad/~dieom/dieom/izwian2k7/Trikster/God
 |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1128
|
Posted: Mon May 05, 2008 3:29 am Post subject: |
|
|
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 |
|
 |
poetbox
Joined: 07 Jan 2007 Posts: 59
|
Posted: Mon May 05, 2008 5:07 am Post subject: |
|
|
| [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.
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.
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.  |
|
| Back to top |
|
 |
mfgarcia
Joined: 05 May 2008 Posts: 2 Location: Lisbon, Portugal
|
Posted: Tue May 06, 2008 12:20 am Post subject: |
|
|
| [VxE] wrote: |
btw: is it really so much trouble to press 2 keys at once? |
no, it is'nt! but btw, is'nt this the purpose of "ahk"..automate actions?
I'm just messing with you , 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
Cheers |
|
| Back to top |
|
 |
|