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.

Create event if window in focus?

If you have a question or need help, this is the place to be.
Post Reply
unvaluablespace
Posts: 7
Joined: Mon Jan 21, 2013 9:00 am

Create event if window in focus?

Post by unvaluablespace »

Hi. This is related to another thread I created regarding the xbox guide button. I found that the xbox accessories comes with a program in windows "Xboxstat.exe" which basically just pops up a small window telling you which controller is connected, and battery life. since the xbox guide button itself works in such an odd manner that it doesn't get recognised as a regular button, I was wondering if its possible to have eventghost do a command once a window comes into focus. My reasoning for this is that when you press the xbox button, the xboxstat window pops up into focus. I was hoping it would be possible to have an event run if that window pops up into focus. If possible, then that would be great for me because I could use eventghost to start an application once the xboxstat window pops into focus, which would basically turn the xbox guide button into a "home menu" for a program I am trying to use for my HTPC setup, called HyperSpin.

I am running the latest version of EvenGhost, 0.4.1.r1600
Windows 8, 64-bit.

Please help. Thanks. :)
phlox
Plugin Developer
Posts: 90
Joined: Wed Jan 11, 2012 3:49 pm

Re: Create event if window in focus?

Post by phlox »

I'm not using xbox nor do I know that program you mention, however, did you try using the plugin 'Task Create/Switch Events'? (it's part of the EG distribution). This plugin creates an event when a window gains the focus and anotherone one when it loses focus.

Code: Select all

16:27:12   Task.Deactivated.EventGhost
16:27:12   Task.Activated.Desktop
16:27:18   Task.Deactivated.Desktop
16:27:18   Task.Activated.EventGhost
hth.
unvaluablespace
Posts: 7
Joined: Mon Jan 21, 2013 9:00 am

Re: Create event if window in focus?

Post by unvaluablespace »

phlox,

yes, I found that plugin, and used it for my idea. It seems that the program xboxstat.exe that I was referring to, for some reason does not show up as a task in evenghost. I've no idea why. But I did use another program, called "XboxExt.exe" by Pety. It's a small little program that sits in the system tray, and when you hold down the Xbox guide button, a pop up appears to allow you to turn off the controller. This program actually does show up as a task in eventghost, and I have made a simple script which basically says that when that pop up window appears, to start a particular program, and close the window. It sort of works. For some reason the program doesn't always properly get listed in eventghost, and you have to actually click on the popup window first for it to work. Is there a way to make eventghost always see that this window is open?

I have attached the script I created in EventGhost, if anyone is interested. The purpose of this script is to allow the xbox guide button work like a launcher of sorts. If anyone wants it, you can just edit the run application part for any other program you want it to run. But the purpose of me to upload it is if anyone else can help me get it to work better. :)
Attachments
Xbox Home Button.xml
Xbox Home Button
(769 Bytes) Downloaded 198 times
Post Reply