Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

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 »

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 »

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 »

thanks heaps m8:-)

regards,
Dam0
Post Reply