Basic how to run applescript in XBMC question
#1
I've written a basic script that quits XBMC and opens Safari. I can run it in the Applescript editor program without a problem. I can't seem to make it work in XBMC.

In Advanced Launcher (I'm running Eden), I have the platform as "Macintosh" and for "Advanced settings" I have the following:

Change Application: (my correct path to the script)
Modify Arguments: blank
Change ThumbsPath: blank
Change Fanarts Path: blank
Change Custom Path: blank
Toggle XBMC Fullscreen: On.

I have the sense I'm making a very basic error here -- just don't know what it is. Thanks for any help.
Reply
#2
(2013-01-13, 02:53)csgnyc Wrote: I've written a basic script that quits XBMC and opens Safari. I can run it in the Applescript editor program without a problem. I can't seem to make it work in XBMC.

In Advanced Launcher (I'm running Eden), I have the platform as "Macintosh" and for "Advanced settings" I have the following:

Change Application: (my correct path to the script)
Modify Arguments: blank
Change ThumbsPath: blank
Change Fanarts Path: blank
Change Custom Path: blank
Toggle XBMC Fullscreen: On.

I have the sense I'm making a very basic error here -- just don't know what it is. Thanks for any help.
I may be wrong, because I'm not a MAC user, but a script is not an application. You need to indicate the script interpreter as the application (I think it is osascript for MAC) and the path to your script as argument (may you will also need to indicate a switch).

Reply
#3
(2013-01-13, 02:53)csgnyc Wrote: I've written a basic script that quits XBMC and opens Safari. I can run it in the Applescript editor program without a problem. I can't seem to make it work in XBMC.

In Advanced Launcher (I'm running Eden), I have the platform as "Macintosh" and for "Advanced settings" I have the following:

Change Application: (my correct path to the script)
Modify Arguments: blank
Change ThumbsPath: blank
Change Fanarts Path: blank
Change Custom Path: blank
Toggle XBMC Fullscreen: On.

I have the sense I'm making a very basic error here -- just don't know what it is. Thanks for any help.

In userdata/addon_data/plugin.program.advanced.launcher/launchers.xml:
Code:
<application>/usr/bin/osascript</application>

In the same script between <args> and </args> put the the complete file path (including the name of the applescript) of where your applescript resides.
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
Reply
#4
Thanks. Still not working but I think we're close. I edited the XML file that winestock referred to so it now reads (hope someone ses the problem):


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
<launcher>
<id>b2a0d6aa5f6543579b31c9c2ded8eaee</id>
<name>launch safari from xbmc</name>
<application>/usr/bin/osascript</application>
<args>/Users/csgnyc/Desktop/launch safari from xbmc.scpt</args>
<rompath></rompath>
<thumbpath></thumbpath>
<fanartpath></fanartpath>
<custompath></custompath>
<romext></romext>
<platform>Macintosh</platform>
<thumb></thumb>
<fanart></fanart>
<genre></genre>
<release></release>
<publisher></publisher>
<launcherplot></launcherplot>
<minimize>true</minimize>
<lnk></lnk>
<roms>
</roms>
</launcher>
</launchers>
Reply
#5
Use double quotes to avoid your script path be interpreted as several arguments due to the presence of spaces.
Code:
...
<args>"/Users/csgnyc/Desktop/launch safari from xbmc.scpt"</args>
...
Reply
#6
(2013-01-13, 04:41)Angelscry Wrote: Use double quotes to avoid your script path be interpreted as several arguments due to the presence of spaces.
Code:
...
<args>"/Users/csgnyc/Desktop/launch safari from xbmc.scpt"</args>
...

Thanks. That solved the problem.

Reply

Logout Mark Read Team Forum Stats Members Help
Basic how to run applescript in XBMC question0