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 Window and close it

If you have a question or need help, this is the place to be.
Post Reply
muzicman0
Posts: 9
Joined: Tue Jul 24, 2012 8:14 pm

Find Window and close it

Post by muzicman0 »

I am using Find Window in a macro to find Windows Media Center. The next command is close window...because I want to close it before I open JRiver Media Center (opened by the same macro)...

It works great if WMC is open, but if it's not, then it just closes whatever window has the focus...which is not what I want...

Is there a way to:

Code: Select all

Find Window 'XYZ'

If Window 'XYZ' is exists, then close it.

Otherwise, if Window 'XYZ' doesn't exist, then just continue with the macro.
Any help is appreciated!

mm0
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Find Window and close it

Post by jonib »

I think there are several ways to do this.

One way is to put the "close window" in a separate macro, then put a "jump" action right after the "Find window" action, configure the jump action to jump to your "close window" macro if successful and then return.
You can put other actions after the jump action like open JRiver Media Center.

This way you only execute the "close window" action when a window has been found.

Hopefully this was useful. :D

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
muzicman0
Posts: 9
Joined: Tue Jul 24, 2012 8:14 pm

Re: Find Window and close it

Post by muzicman0 »

so will the jump command only be executed if the previous Find Window command is successful?
muzicman0
Posts: 9
Joined: Tue Jul 24, 2012 8:14 pm

Re: Find Window and close it

Post by muzicman0 »

ah...I see how it works now...I will try it, looks like it should work.
Post Reply