Is there a way that I am perhaps missing that applescript files can be run via the http api? The reason I am asking is I am creating an iPhone Plex Remote application and am trying to interface with my ZephIR blaster so I can change inputs on the TV / Receiver. Thanks.
I'd be terribly surprised if you could... running applescripts is a new Plex thing not an XBMC thing, and afaik there's been no work done on the http api for Plex specifically (I'd be delighted to be corrected if I am wrong), although, I've got a completely unsubstantiated feeling that there may be some work in that direction in the future.
You can run python scripts though... a python script to call an applescript shouldn't be too hard...
[http://xbmc.org/wiki/?title=List_of_Built_In_Functions](http://xbmc.org/wiki/?title=List_of_Built_In_Functions)
Search for RunScript
Thanks, I'll check that out!
The new Plex features for running AppleScripts are extensions of the RunScript command - just put an AppleScript in your Scripts directory & pass the name into RunScript (e.g. Plex.RunScript(MyScript.applescript). You can also use Plex.RunAppleScript() to run script commands directly, although I don’t know if this will work with the HTTP API.
Hurrah! Thanks for that jam, managed to figure it out... the syntax for those who want to know is:
http://{PLEX IP ADDRESS}:{PLEX PORT NUMBER}/xbmcCmds/xbmcHttp?command=ExecBuiltIn(RunScript({SCRIPTNAME}.applescript))
By default the port is 3000.
Thanks again Jam and Kent for your help!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.