Support for Custom AppleScript in BM-Link
NOTE! This is a feature made available for your convenience only, no support is given for custom written scripts.
This feature is used for the included Front Row support. To use your custom script you must disable it in the preference pane.
BM-Link v1.5 contains support for executing a custom AppleScript in response to commands received through the IR-eye connected to the BeoLink PC2 box.
In order to activate this function you need to set a user default setting in BM-Link, this is done with the following command in the Terminal
defaults write se.odlund.BMLink.MLServer \ IRAppleScriptPath <Path To Script>
Where you change <Path To Script> into the real path of the script. This applescript must contain the following function.
on IrCommand(source, command, linkbit) end IrCommand
The parameter source is the name of the source to which the IR-command is sent (TV, RADIO, ...), command is the name of the command (PLAY, STOP, UP, DOWN, ...) and finally linkbit is an integer telling wether the the command received was a link command or not. (Some sources and commands are integers instead of strings, this is because only the most common ones are translated into strings)
If something is returned from the script it will be printed out to the console. This can be used for debugging.
BM-Link need to be restarted in order to make the user default setting take effect, but after this the script file is reloaded if a change is detected.
Included is an example script with basic control of QuickTime Player.