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.

Changing focused application

If you have a question or need help, this is the place to be.
kricker
Experienced User
Posts: 147
Joined: Thu Oct 12, 2006 5:49 am
Contact:

Changing focused application

Post by kricker »

After some more playing around it seems EvenGhost only sees a program as 'activated' if it is clicked on by the mouse or when a program is 1st launched. A mere focus change to any program either by sendmessage or alt+tab does nothing. Any chance of someone writing a true 'window focus' plugin?

Crossed posted in the newbie thread where I already got much needed help. But I thought this maybe deserved it's own thread.
drummer83
Posts: 37
Joined: Wed Jul 12, 2006 1:47 pm

Post by drummer83 »

My installation creates events when I use Alt+Tab. Make sure that the checkbox in the status-bar is unchecked.
kricker
Experienced User
Posts: 147
Joined: Thu Oct 12, 2006 5:49 am
Contact:

Post by kricker »

It does for me as well, until Meedio is launched, Then alt+tabbing from Meedio does not create an event.
kricker
Experienced User
Posts: 147
Joined: Thu Oct 12, 2006 5:49 am
Contact:

Post by kricker »

I guess I can call this fixed now. I was killing explorer when launching Meedio to save resources.When explorer is killed I no longer get the activated events. So now I just don't kill explorer and things work fine. Too bad though, I like to save on resources where I can.
aarb00
Posts: 18
Joined: Tue Apr 17, 2007 2:58 am

Post by aarb00 »

I think I may be having this same problem, but havenÔÇÖt come up with a solution. I run Meedio for all of my media activities except for TV and keep it loaded all of the time. I use Beyond TV for TV and launch it with either the TV button on my remote, or an icon within Meedio. Either way, a BeyondTV.activated event is created and EventGhost goes into that mode, but when I quit Beyond TV and all you see is Meedio on the screen, a Meedio.activated event isnÔÇÖt created. Therefore I am in Meedio with EventGhost configured for BeyondTV.

If I switch exclusive to Meedio with a BeyondTV.deactivated, or destroyed event, I end up with Meedio exclusive while Beyond TV is running because when I launch BeyondTV I get a combination of activated, created, and destroyed events all while it is still running.

Any suggestions?

Thanks,

Brian
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

The easiest solution would be, if BeyondTV could be configured to launch some kind of "shutdown .BAT" on exit, that could be used to trigger an event.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
kricker
Experienced User
Posts: 147
Joined: Thu Oct 12, 2006 5:49 am
Contact:

Post by kricker »

aarb00 wrote:I think I may be having this same problem, but havenÔÇÖt come up with a solution. I run Meedio for all of my media activities except for TV and keep it loaded all of the time. I use Beyond TV for TV and launch it with either the TV button on my remote, or an icon within Meedio. Either way, a BeyondTV.activated event is created and EventGhost goes into that mode, but when I quit Beyond TV and all you see is Meedio on the screen, a Meedio.activated event isnÔÇÖt created. Therefore I am in Meedio with EventGhost configured for BeyondTV.

If I switch exclusive to Meedio with a BeyondTV.deactivated, or destroyed event, I end up with Meedio exclusive while Beyond TV is running because when I launch BeyondTV I get a combination of activated, created, and destroyed events all while it is still running.

Any suggestions?

Thanks,

Brian
How are you "quitting" BTV? Are you running the newest version of EventGhost (including the betas supplied on these forums)?
aarb00
Posts: 18
Joined: Tue Apr 17, 2007 2:58 am

Post by aarb00 »

There are two ways I can quit. One is the hit the ÔÇ£CloseÔÇØ button on my Firefly. The other is to quit by pushing ÔÇ£OKÔÇØ on the Firefly while on the ÔÇ£Exit Beyond TVÔÇØ selection of the Beyond TV GUI.

If I use the ÔÇ£CloseÔÇØ button, I can put a command to enable ÔÇ£MeedioÔÇØ, but if I just exit in Beyond TVÔÇÖs GUI, I am stuck. I would like it to work both ways for ease of use.
aarb00
Posts: 18
Joined: Tue Apr 17, 2007 2:58 am

Post by aarb00 »

Bitmonster wrote:The easiest solution would be, if BeyondTV could be configured to launch some kind of "shutdown .BAT" on exit, that could be used to trigger an event.
I created a script in AutoHotKey that recognizes Beyond TV quitting. What should I put in the script, and how do I get EventGhost to recognize it. I looked through the various tools, but I am not sure which one to use.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Call EventGhost.exe with the "-e" parameter:
EventGhost.exe -e MyEventName

This should trigger an event inside EG.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
kricker
Experienced User
Posts: 147
Joined: Thu Oct 12, 2006 5:49 am
Contact:

Post by kricker »

Bitmonster wrote:Call EventGhost.exe with the "-e" parameter:
EventGhost.exe -e MyEventName

This should trigger an event inside EG.
This is a neat trick. Now I can kill explorer and use this to activate events!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

It seems I have just found a way to get the events working for such problematic applications. This is also related to this bug:
http://www.eventghost.org/forum/viewtopic.php?t=209

I hope in some days we have a better Task plug-in.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
kricker
Experienced User
Posts: 147
Joined: Thu Oct 12, 2006 5:49 am
Contact:

Post by kricker »

Bitmonster wrote:It seems I have just found a way to get the events working for such problematic applications. This is also related to this bug:
http://www.eventghost.org/forum/viewtopic.php?t=209

I hope in some days we have a better Task plug-in.
I was just looking for that. I bet BTV has such an option.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Meedio also has an option to don't show up in the taskbar. But even if you turn this off and Medio is visible in the taskbar, Windows doesn't generate events for it.

But it seems to be possible to write a hook, that is called on every keyboard focus change. And it looks like this even works for applications like Trillian. But I have to explore it a bit more.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
aarb00
Posts: 18
Joined: Tue Apr 17, 2007 2:58 am

Post by aarb00 »

Here is my AutoHotKey script in case someone needs it for reference.

Loop

{
WinWaitActive, Beyond TV
WinWaitClose, Beyond TV
Run, "C:\Program Files\EventGhost\EventGhost.exe" -e QuitBeyondTV
WinActivate, Meedio
}

There maybe better ways of doing this, but it does work.

Now I can use the Main.QuitBeyondTV() event to activate my Meedio exclusive.

The only downside to this process is that the script is always running and takes up a few K of RAM. This program however uses 50 MB less RAM than the Firefly software so I come out ahead.

If anyone has a better idea to detect Beyond TV closing, or Meedio becoming activated please let me know.

Thank you.
Post Reply