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.

Find program and bring to front.

If you have a question or need help, this is the place to be.
Post Reply
piipes
Posts: 34
Joined: Wed Mar 23, 2011 12:21 pm

Find program and bring to front.

Post by piipes »

I use those action when i back xbmc, all works ok. But...

If xbmc is crashed, find program action works, but bring to front action hangs eventghost.
How i can kill xbmc, if bring to front doesn't work? I have allready kill macro, but i can't run it when eventghost is hang.

Eventghost start send all queued actions, when i kill xbmc manual.

I use dvbv plugin, xbmc2 plugin and ps3 plugin.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Find program and bring to front.

Post by jonib »

Maybe you can use a JSON-RPC command that returns a result to test if XBMC is still alive before you do the "bring to front" action.
Just add an XBMC2\Experimental\JSONRPC action and configure it to JSONRPC.Ping, then put a jump action that jumps to a macro based on if the Ping is successful or not.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
piipes
Posts: 34
Joined: Wed Mar 23, 2011 12:21 pm

Re: Find program and bring to front.

Post by piipes »

Thanks, that is what i look and it works.
I left dvbv and xbmc allways open, so there is no waiting when change between programs.

Is there anyway to restart eventghost automatic when it hangs? Or even better, run .cmd when it happens.
piipes
Posts: 34
Joined: Wed Mar 23, 2011 12:21 pm

Re: Find program and bring to front.

Post by piipes »

Noup, that does not work. Xbmc answer pong even if it crashed.
Atramhasis
Posts: 13
Joined: Sun Feb 18, 2007 8:50 am

Re: Find program and bring to front.

Post by Atramhasis »

I have the same Problem: When xbmc crashed (it happens...) and I try to bring it to front, EventGhost becomes unresponsive.

Is there a solution for this?
themaster1
Experienced User
Posts: 133
Joined: Wed Feb 03, 2010 9:02 pm

Re: Find program and bring to front.

Post by themaster1 »

Which xbmc version do you have installed.
I know for a fact the 12.2 frodo is still running (when i check with the task manager) if i close it properly.Same for a crash i believe.Hence the impossibility for me to rerun it right after

The bottom line: i use the task manager
Atramhasis
Posts: 13
Joined: Sun Feb 18, 2007 8:50 am

Re: Find program and bring to front.

Post by Atramhasis »

I use the newest monthly build. But my problem is not with xbmc, I have an action in EG to kill xbmc. But when xbmc crashes AND I do the "Bring to Front" action in EG, THAN EventGhost hangs (yellow icon) and I can not send any event to it.
My best solution is to just use the action "Start Program: XBMC.exe", this brings xbmc to front and does not hang EG, when xbmc crashed.

By the way, here is my macro to kill xbmc, so you don't have to use Task Manager:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1640">
    <Macro Name="Kill XBMC" Expanded="True">
        <Event Name="xbmc_kill" />
        <Action>
            XBMC2.Quit()
        </Action>
        <Action>
            EventGhost.ShowOSD(u'Closing xbmc\n\n  please wait', u'0;-35;0;0;0;700;0;0;0;0;3;2;1;34;Arial', (234, 55, 60), (255, 255, 255), 4, (0, 30), 0, 9.0, False)
        </Action>
        <Action>
            EventGhost.Wait(8.0)
        </Action>
        <Action>
            Window.FindWindow(u'XBMC.exe', None, None, None, None, 1, False, 0.0, 0)
        </Action>
        <Action Name="Kill XBMC">
            System.Execute(u'{eg.folderPath.System}\\taskkill.exe', u'/F /IM XBMC.exe', 3, True, 3, u'', False)
        </Action>
        <Action>
            EventGhost.Wait(2.0)
        </Action>
        <Action>
            EventGhost.FlushEvents()
        </Action>
    </Macro>
</EventGhost>
Post Reply