Quote:
Originally Posted by
Murilo 
"Task.NewWindow.Control"
"Task.Created.Control"
"Task.Activated.Control"
I think there are probably easier ways to do this that do not rely on EventGhost at all. You really should look upstream to what actually triggers the exe (or bat, sorry, I'm still unclear what you're describing) and then find a way to insert a new step in that process. I'd bet it's possible and a far better and more reliable approach, but I'll just go ahead and answer the EventGhost part.
You need to add a plug-in to your configuration. EG isn't tied in to all Windows events for external Windows proceses yet. You need to add the "Process Watcher" plug-in to get those. Choose "Add Plugin" then find that one from the installed plugins (Other->Process Wtacher) and add it to the Autostart section. Now you'll see the windows event stream appear in the EG status window when you start/start apps.
You'll need to start your program (and probably some others too) and see what gets generated as events for it. With luck something unique that signals that your app is started will show up. Watch the status window as you open & close programs to learn how these work. It will be named something like the 3 you listed above but probably start with Process.Created.[something] instead. The problem here is that *if* the exe is really running in an MS-DOS command window you may only see the command window process instead and *that* won't necessarily be a unique event. That's why I suspect you'd be better off solving this from another angle, but I didn't test running a proces from an MS-DOS command myself to see what EG also sees so you'll have to test it and figure out how that works. If you can find one (and with luck, unique) event, you'll then set up an EG macro that triggers only on that event. A macro "triggers" when any of the events inside it are "observed" to occur and it performs all the actions that are inside the scope of that macro and below that trigger event.
So first, create a new folder at the top of the tree and name it "Global Actions". Make sure it's enabled. Now add a new macro in the "GA" folder just created and give it a useful name and make sure it's enabled. Next add the unqiue event that you found when your app starts. You can drag the event from EG's explorer status pane onto (or just below) your macro or just add a new event to the macro and type the full name of the event exactly as it appeared in the status window. Finally add a EG->Python Script action to that same macro below the newly added event and paste in the python script code I gave you before to handle the HTTP communications that you need to switch inputs on the avr.
It should look kind of like this:
Code:
Tree
|
+Autostart
|
+Plugin: Process Watcher
|
+[folder]Global Actions
|
+[macro]Your Macro
|
+[event]Process.Created.YourApp
+[action]Python Script
|
+Next Macro (not used
Please note that this is *conceptual*. Those aren't going to be the actual names. You need to figure them out and I can't do it from the info I have.
The new macro you add should have "global" scope (i.e., one that will run at all times since EG allows you to also activate and deactivate macros or groups of macros depending on conditions). Since you don't need EG for anything else at this point you can just have the one macro and nothing else in your configuration. That would be "global" as long as the Global Actions folder is always enabled and you don't set up anything to disable it from other events. Now whenever EG "sees" that event occur it will trigger all the Actions in the macro it's assigned to which in this case will be to run the one script which is below it in the macro and which sends the URL. Of course EG always has to be running on your system for any of that to work.
The standard EG install comes with a bunch of example xml files that you can load and learn from. You should take a look at how they set up some of the basics to get an idea how the app works. All of those examples will be far more than what you need here but the structures can be helpful to learn how to set it up to perform functions.