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.

EventGhost close itself?

If you have a question or need help, this is the place to be.
Post Reply
bskip
Posts: 3
Joined: Sat Sep 05, 2009 3:03 pm

EventGhost close itself?

Post by bskip »

Is there a command I can run in EventGhost to have it close itself on an event? I've been searching the forum and trying things for a few days and can't seem to get it to work. If I run an external program that just ends the EventGhost.exe process it still leaves the tray icon in the corner. It seems like there must be a more elegant way to do this.

Thanks!

EventGhost version: EventGhost 0.3.7.r1194
OS Version: Windows 7 RTM
Prinz
Plugin Developer
Posts: 194
Joined: Mon Apr 07, 2008 4:58 am

Re: EventGhost close itself?

Post by Prinz »

Hi,
bskip wrote:Is there a command I can run in EventGhost to have it close itself on an event?
Could you tell us the reason for it?

Regards
Prinz
Mein HTPC:
Mainboard: Gigabyte GA-G33M-DS2R
CPU: Intel E5200
OS: WinXP SP3
Graphic card: NVIDIA GeForce 210 512MB
TV-Cards: 2 * Digital Everywhere FloppyDTV-C, Terratec Cinergy 1200 DVB-C
HTPC software: DVB Viewer / EventGhost
bskip
Posts: 3
Joined: Sat Sep 05, 2009 3:03 pm

Re: EventGhost close itself?

Post by bskip »

I've got a USB-Uirt that I'm using with a MCE remote that I use to control the computer and turn my TV and home theater receiver on and off. I've had a problem where the USB-Uirt randomly stops responding. I've tried putting ferrite beads on the USB-Uirt cable and that fixed the problem except for when the computer wakes up from sleep. I've tried having EventGhost disable the USB-Uirt plugin before sleeping and enable it again on resume but that didn't work. I've tried putting in a command in EvenGhost to restart the USB-Uirt driver with Devcon.exe but that didn't work. The only thing I've found that works reliably every time is for when the computer resumes from sleep to run an external script from EventGhost OnResume that closes EventGhost, restarts the driver with Devcon.exe, and then restarts EventGhost. I've been just closing the process but like I said that leaves the tray icon in the corner and I'm worried the plugins might not be unloaded properly with this method. What I'd like it for EventGhost to be able to call the script OnResume and then close itself gracefully. The script would wait for EventGhost to close, then restart the driver and fire EventGhost back up.

Does that make sense?
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: EventGhost close itself?

Post by Bitmonster »

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0">
    <Macro Name="Exit EventGhost" Expanded="True">
        <Action>
            EventGhost.PythonScript(u'wx.CallAfter(eg.app.Exit)')
        </Action>
    </Macro>
</EventGhost>
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
bskip
Posts: 3
Joined: Sat Sep 05, 2009 3:03 pm

Re: EventGhost close itself?

Post by bskip »

Perfect!

Thank you so much!
Post Reply