Thursday, July 31, 2008

Switching audio streams and subtitles with the MS remote

ShadowFor some reason it is not possible to switch audio streams or subtitles in Vista Media Center with your remote. You can use the keyboard combinations Ctrl+Shift+A for Audio and Ctrl+U (for sUbtitles?), but I don't want to drag out my keyboard when watching a movie. Not to mention it's difficult for the rest of the family to remember the correct key combination (Ctrl+A activates the radio by the way, so you need to remember to press that Shift key too...).

But there is light at the end of the tunnel. It's called Autohotkey (AHK for short) and it allows you to trigger actions based on keypresses. And you have a couple of unused buttons on your MS remote control anyway (the colored ones at the bottom). It is not for the faint of heart, but it is possible. And here's how to do it:
  1. Download the latest version of Autohotkey and install it
  2. Download Micha's Human Interface Device support for AHK here
  3. Unpack Micha's rar file in a new directory of your choice
  4. Run the vcredist_x86.exe to install necessary DLL:s (I forgot this first and couldn't grok the error messages I got)
  5. Download my remote control script and save it in the same directory. Name it e.g. MyRemote.ahk (or whatever you want - it needs to end with .ahk though)
  6. Create a shortcut to the MyRemote.ahk script in your Autostart folder (optional, but nice)
You should now be able to use the red button to switch audio tracks and the green button to switch subtitles!

But if you're out of luck you might run into problems. E.g. your remote might send different codes. In that case you need to find out the remote control codes your remote sends. Uncomment the line MsgBox Received code: %Vals% in the script to find out your specific codes and change the values in your script correspondingly.

Sources of information and credit to:

No comments: