Guide: IRSS & Apple Remote (1 Viewer)

gechu

Portal Member
November 17, 2010
9
0
In this post I´ll describe how to:
- use your computer both as a media center and "usual" computer both at the same time
- increase functionality of Apple Remote
- target unfocused applications
- seamless remote control integration between Windows Media Center and the external player set up in Media Browser


The Apple Remote can be paired up with any eHome compatible IR receiver/transeiver. I´m very happy with TwistedMelon Mantra TR1. I use it in Windows 7 x64.

The Apple Remote is both a blessing and a curse. It looks really nice with its minimalistic set of buttons. The bad news is that you´ll get quite limited because you can only assign one "System wide" button configration at a time. And you do want "System wide" keys set up in Translator if you plan on using your computer for more than one thing at a time. Like one person watching TV, and another browsing the web. Then you want to be able to send "zap channel" commands to your TV application even though the TV application isn´t in focus.

To target an unfocused window you have to use the Window Message interface in Traslator. It can be quite tricky to figure out how to compose different commands. I´ve used Google and a little Microsoft utility called Spy++. I use it to log all commands sent to a particular application. Window Messages expects values in decimal, but often when you find values they´re in hex. Use Windows calculator to translate between hex and decimal.

Here are some useful links:
List of Windows Messages
Virtual-Key Codes (Windows)


The Apple Remote has 7 buttons. And as mentioned, it is desirable to be able to target unfocused windows by placing commands in the "System wide" profile. That would give us the posiblity to remotely send only 7 different commands using this remote. Not very functional!

One solution is to sacrefice one button by binding it to a "switch button configuration" function. To do that translator have to be restarted with the "-config" argument targeted at a new configuration file. To cycple between multiple configration files "chaning" them together is one option. Chaning them together can look like this:

config1 contains a "switch to config2" command
config2 contains a "switch to config3" command
config3 contains a "switch to config1" command

To accomplish chain-loading I use VB scripts to load a new configration. Using the WshShell object I can run applications hidden from the user, in either sequential or parallell mode.


In the attached package I´ve included two three scripts:

dscaler.vbs
windows_media_center.vbs
MPC.vbs

dscaler.vbs works flawlessly! But I haven´t figured out how to set up to target an unfocused Windows Media Center.. So windows_media_center requires focus to work.

MPC.vbs contains very similar functionality but requires a little explaination. In my setup I use Windows Media Center with the Media Browser plugin. In Media Browser I can specify that I want to use an external player. Instead of directly adding the reference to Media Player Classic - Home Cinema (my preferred external player), I added a VB script which:

1. kill transaltor
2. load it with a new configuration
3. load MPC-HC
4. when done, kill translator again
5. and focus is back to Media Browser

You´ll have to change MPC-HC Options > player > keys to match this setup (format: "command" > "app command")

Exit > BROWSER_BACKWARDS
Play/Pause > MEDIA_PLAY_PAUSE
Stop > MEDIA_STOP
Jump Forward (medium) > MEDIA_FAST_FORWARD
Jump Backwards (medium) > MEDIA_REWIND
Volume Up > VOLUME_UP
Volume Down > VOLUME_DOWN
Volume Mute > VOLUME_MUTE


To get it all working you´ll probably have to remap all commands in transaltor to match your remote control. And some file references will also have to be changed in the included scripts.

The package also contains an Autohotkey script called OSD.ahk. I use it to inform the user which configuration has been loaded. Download and install Autohotkey. To compile it simply right-click a select "compile".

Here is the package that contains configuration files and scripts:
http://dl.dropbox.com/u/5227529/IRSS_apple_remote_package.zip


Enjoy!
 

Users who are viewing this thread

Top Bottom