eg.TriggerEvent() help pls

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
Dam0
Posts: 5
Joined: Sat Jan 30, 2010 12:02 pm

eg.TriggerEvent() help pls

Post by Dam0 » Sat Jan 30, 2010 12:12 pm

first off, great software, very handy tool indeed.

im trying to code a small python script that will eventually open xbmc if its not already open, if it is open, it will close it.

this is the event i wish to trigger

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Action>
XBMC.Quit()
</Action>
</EventGhost>"

and shows this in the logs

XBMC: Quit XBMC

when i try this as a macro ,

eg.TriggerEvent(" XBMC.Quit()")

this is what logs show;

Main.XBMC.Quit()

it seems to add the main prefix instead of the xbmc prefix, i guess im doing something wrong, but i hope someone can help me?

thanks in advance,
Dam0

Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: eg.TriggerEvent() help pls

Post by Bartman » Sat Jan 30, 2010 12:14 pm

Code: Select all

eg.TriggerEvent("Quit()", prefix="XBMC")

Dam0
Posts: 5
Joined: Sat Jan 30, 2010 12:02 pm

Re: eg.TriggerEvent() help pls

Post by Dam0 » Sat Jan 30, 2010 12:23 pm

thanks heaps m8:-)

regards,
Dam0

Post Reply