2014-04-30, 16:26
(2014-04-30, 12:27)Gigantur Wrote: Here is a simple Volume-up keymap for Apple Remote HOLD CENTRE that I used successfully before switching to fixed max volume (due to HDMI output) .. took me ages to get to work - syntax on runscript should be exactly as below.
(see Winestock for his excellent Applescript - I used a modified earlier version to quickly jump vol in larger increments )
keyboard.xml
<keymap>
<FullscreenVideo>
<joystick name="AppleRemote">
<button id="1">VolumeUp</button>
<button id="2">VolumeDown</button>
<button id="3">StepBack</button>
<button id="4">StepForward</button>
<button id="5">Pause</button>
<button id="6">Stop</button>
<button id="7">runscript(/Users/chris/Library/Application Support/XBMC/scripts/VolumeUp.applescript)</button>
<button id="8">OSD</button>
<button id="9">Rewind</button>
<button id="10">FastForward</button>
</joystick>
</FullscreenVideo>
</keymap>
I am surprised the runscript command even works for you because runscript command is for running python scripts not applescripts (http://wiki.xbmc.org/index.php?title=Lis..._functions ):
Quote:RunScript(script[,args]*) Runs the python script. You must specify the full path to the script. If the script is an add-on, you can also execute it using its add-on id. As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argv
RunAppleScript(script[,args]*) Run the specified AppleScript command
By the way, you could change /Users/chris/Library/Application Support/XBMC/scripts/VolumeUp.applescript to special://home/scripts/VolumeUp.applescript. Makes the paths more portable if you ever decide to move the userdata folder to another user.
(2014-04-30, 13:20)bigbadrabbit Wrote: Aren't you guys experiencing small freezes when playing a video and executing an applescript? Every time i press the volume keys, the video is stopped while the script is being executed.
I'm using this applescript to control the volume of my Marantz-AVR:
Code:set telnet to "(echo MVUP; sleep 0.1) | telnet 192.168.0.74 23 > /dev/null 2>&1 &"
do shell script telnet
delay 0.1
do shell script telnet
delay 0.1
do shell script telnet
delay 0.1
do shell script telnet
Also - why are you using keyboard.xml instead of joystick.AppleRemote.xml?
Yes, I see a small pause in the video while the script is executing. I have always used keyboard.xml instead of joystick.AppleRemote.xml.