Launching Applescript with Harmony Remote
#1
Hi - I have been trying to get the following script to run using the red button on my harmony remote within XBMC:-

tell application "Finder"
if exists disk "media" then
do shell script "diskutil unmount /Volumes/media"
if exists disk "music" then
do shell script "diskutil unmount /Volumes/music"
delay 10
end if
end if
if not (exists disk "media") then
sleep
end if
end tell

The above has been saved in text format and has been copied over into the script directory.

I have copied the joystick.Harmony.xml file from the XBMC package and update the following line as follows:-

<!-- Red --> <button id="83">XBMC.RunScript(/Users/xxxxx/Library/Application Support/XBMC/Scripts/umount_sleep.applescript)</button>

the above is under the global settings and i have copied the joystick.harmony.xml to my userdata keymaps directory, have i missed something here?

Thanks in advance Smile
Reply
#2
(2012-11-18, 16:24)Jokerjack Wrote: Hi - I have been trying to get the following script to run using the red button on my harmony remote within XBMC:-

tell application "Finder"
if exists disk "media" then
do shell script "diskutil unmount /Volumes/media"
if exists disk "music" then
do shell script "diskutil unmount /Volumes/music"
delay 10
end if
end if
if not (exists disk "media") then
sleep
end if
end tell

The above has been saved in text format and has been copied over into the script directory.

I have copied the joystick.Harmony.xml file from the XBMC package and update the following line as follows:-

<!-- Red --> <button id="83">XBMC.RunScript(/Users/xxxxx/Library/Application Support/XBMC/Scripts/umount_sleep.applescript)</button>

the above is under the global settings and i have copied the joystick.harmony.xml to my userdata keymaps directory, have i missed something here?

Thanks in advance Smile


I did it!! im not sure if this makes any difference but i changed the file name to just sleep and also the line endings type from 'MAC OS X / Unix LF' to 'Classic Mac OS (CR)' - it all works a treat now.
Reply

Logout Mark Read Team Forum Stats Members Help
Launching Applescript with Harmony Remote0