Possible to start a script in XBMC using Event Ghost?
#1
Hello,

Is it possible, using Event Ghost (EG), a script, or something else to start a script in XBMC after XBMC has opened?

What I need to do is to open XBMC at a specific time (w/EG), start a script (w/?), stop script and/or exit XBMC sometime later (w/EG).

I could put the command to open said script in the autoexec.py in the userdata directory, but I do not want the script to open everytime I run XBMC.

I was hoping someone might know whether this was possible with EG XBMC plugins or something else that I could execute using EG?

Thanks for your help in advance,
Mark
Reply
#2
You can create a custom key mapping to associate a keystroke of your choice with the RunScript function. See http://wiki.xbmc.org/?title=List_of_Built_In_Functions for info on the RunScript function. You'd need something like:

Code:
<keymap>
  <global>
    <keyboard>
      <r mod="ctrl,shift">RunScript(C:\MyScripts\Myscript.py)</r>
    </keyboard>
  </global>
</keymap>

to associate ctrl-shift-R with the script. Change the keystroke to whatever suits you.

JR
Reply
#3
Hi JR...

Thanks for the reply.

I am trying to figure out how associating the "runscript" command with a keystroke would get me what I want using Event Ghost.

Would I then just make a macro in Event Ghost to execute that keystroke and be good to go?

Thanks,
Mark
Reply
#4
Alternately, you could you the Python Script action in EventGhost to call HTTPAPI or JSON. Here's an example of a Python script to do so with HTTPAPI:

Code:
import urllib2

urllib2.urlopen('http://localhost:8080/xbmcCmds/xbmcHttp?command=ExecuteBuiltIn(Runscript(yourscript.py))')
Reply
#5
Making Eventghost send a keypress to XBMC seems an easy way to control XBMC as you can configure the keypress to do anything you want. As fade23 suggests, if Eventghost will run a Python script, and if you don't mind writing Python code, then this is another possibility.

JR
Reply
#6
Thanks for the info. guys.

Mark
Reply

Logout Mark Read Team Forum Stats Members Help
Possible to start a script in XBMC using Event Ghost?0