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.

one button 2 different programs

If you have a question or need help, this is the place to be.
georgeimnot
Posts: 6
Joined: Sun Mar 31, 2013 1:20 am

one button 2 different programs

Post by georgeimnot »

I'd like to assign one button on the remote to do 2 different keyboard emulations based upon which program has the focus. I've tried a few times and I still cant get it to work.

Basically, I'm looking for:
Button A on the remote to:
If VLC.exe is the focus then when button A is sent- send 'f' key
If Plex.exe is the focus then when button A is sent- then send ESC key
else do nothing

I think I may have to do this in python. Can anyone help?
Thanks
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: one button 2 different programs

Post by jonib »

The included EventGhost config "Example.xml" has examples how to use the same buttons for different programs. With Add action\EventGhost\Enable an item, Disable an item and Exclusive enable a folder/macro.
Then you can use "process watcher" or "task create/switch events" plugins to detect what "profiles" to activate automatically.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
georgeimnot
Posts: 6
Joined: Sun Mar 31, 2013 1:20 am

Re: one button 2 different programs

Post by georgeimnot »

I found example.xml and looked at it, but I couldn't find the example you are referring to. Would anyone mind providing me with a copy of their code that does what I'm looking for?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: one button 2 different programs

Post by jonib »

georgeimnot wrote:I found example.xml and looked at it, but I couldn't find the example you are referring to.
Unless you are looking at a different Example.xml that is not in the EventGhost install dir, example.xml is the example I'm referring to. The "Context Folder" contains the macros for the specific programs you want to control. The "Switch to mode..." macros contain the action to enable the macros for the currently active program.

As it's a generic example you need to add/change to your specific macros and events.
Would anyone mind providing me with a copy of their code that does what I'm looking for?
Unless you can find somebody that has your hardware and software any config you get would be almost useless unless you understand how things work.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
georgeimnot
Posts: 6
Joined: Sun Mar 31, 2013 1:20 am

Re: one button 2 different programs

Post by georgeimnot »

Attached is the example that I have. I guess my problem is I just dont understand how these things work. Is there anyone willing to walk me thru what I need? Sorry if I'm a noob and the example doesnt jump put at me with what I'm looking for.
Attachments
Example.xml
(22.14 KiB) Downloaded 241 times
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: one button 2 different programs

Post by jonib »

georgeimnot wrote:Attached is the example that I have. I guess my problem is I just dont understand how these things work. Is there anyone willing to walk me thru what I need? Sorry if I'm a noob and the example doesnt jump put at me with what I'm looking for.
That's the correct one. Have you read through the EventGhost documentation especially the "Short manual"?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
georgeimnot
Posts: 6
Joined: Sun Mar 31, 2013 1:20 am

Re: one button 2 different programs

Post by georgeimnot »

yes, I have read the documentation. And I am still looking for help, which is why I'm here on this forum.

I guess I'm asking something too complicated or way too easy, because all I keep getting is look at the example from you. Is there anyone else who is willing to walk a newbie thru this? or am I in the wrong forum?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: one button 2 different programs

Post by jonib »

I guess I can't help you, as the information I have given, combined with the documentation should get you started. Hopefully someone else can help you better.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
georgeimnot
Posts: 6
Joined: Sun Mar 31, 2013 1:20 am

Re: one button 2 different programs

Post by georgeimnot »

I'll answer my own question. using help from this post:
http://www.eventghost.org/forum/viewtop ... f=5&t=1310
You need to load the following plug in:
Task Create/Switch Events

I hope my example helps others.

The example.xml that is included with the program did not use this plug in. This plug in makes what I was looking for nice and easy.
Attachments
task create-switch events.xml
(4.13 KiB) Downloaded 227 times
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: one button 2 different programs

Post by jonib »

georgeimnot wrote:The example.xml that is included with the program did not use this plug in. This plug in makes what I was looking for nice and easy.
Well, I suggest you put your glasses on as that plugin is used in the example.xml, that is a big part why I suggested that you look at it.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
georgeimnot
Posts: 6
Joined: Sun Mar 31, 2013 1:20 am

Re: one button 2 different programs

Post by georgeimnot »

jonib, not sure where your high and might attitude is coming from. All I did was ask for help. If YOU look at the example.xml that I posted, there is no Task Create/Switch Events.

I'm posting this information to help others not so that I can be all high and mighty like you.

I am a newbie to this, you pointed me to examples that didnt contain the examples I needed. I even posted my example looking for help since you claimed what I was looking for was in there, but wouldnt post what the plugin was called.

This is a great program and I hope that the rest of the users on this board arent as "helpful" as you are.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: one button 2 different programs

Post by jonib »

georgeimnot wrote:jonib, not sure where your high and might attitude is coming from. All I did was ask for help.
I'm sorry you feel that way, as all I was doing was to try to help you.
If YOU look at the example.xml that I posted, there is no Task Create/Switch Events.
When I open the Example.xml YOU posted this is what I get:
EventGhostTask.png
The "Task Create/Switch Events" plugin is clearly loaded and used.
I am a newbie to this, you pointed me to examples that didnt contain the examples I needed. I even posted my example looking for help since you claimed what I was looking for was in there, but wouldnt post what the plugin was called.
Funny if you look at the first reply I did to you:
jonib wrote:Then you can use "process watcher" or "task create/switch events" plugins to detect what "profiles" to activate automatically.
This is a great program and I hope that the rest of the users on this board arent as "helpful" as you are.
Glad you enjoy EventGhost despite me "helping" you.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: one button 2 different programs

Post by blaher »

georgeimnot wrote:jonib, not sure where your high and might attitude is coming from. All I did was ask for help. If YOU look at the example.xml that I posted, there is no Task Create/Switch Events.
You're the only one with the attitude here, I'm afraid.

Jonib held you by the hand and showed you an example. Not only that, but the 'task create' plugin is also clearly documented in the 'short manual' you were linked to.

No good deed goes unpunished, as they say.
themaster1
Experienced User
Posts: 133
Joined: Wed Feb 03, 2010 9:02 pm

Re: one button 2 different programs

Post by themaster1 »

have a look at my config.xml , hopefully that'll help you:
http://www.mediafire.com/view/?w9vi42hdmufbzav

basically you need the plugin task create/switchs events
then make two main folders: one for the switch one for the programs you want to control

the switch folder is divided in two categories (because it work best like that)
-start programs macros
- reactivation macros

The start programs macros use the events Task.Created.name of the app or OSM.name of the app so i can start the program using the OS menu.

The reactivation macros use Task.Activated.name of the app (some of them also use task.created though)

Doing so the switch is automatic & bugless
rnadeau6299
Posts: 2
Joined: Fri Apr 19, 2013 3:52 pm

Re: one button 2 different programs

Post by rnadeau6299 »

Thanks georgeimnot. This is exactly what I was looking for.
Post Reply