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.

give a button a 'double function' possible?

If you have a question or need help, this is the place to be.
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

give a button a 'double function' possible?

Post by THX-UltraII »

Hi guys,

I have a question about the combination I want to use: Logitech HR895 + Lenovo IR receiver + HTPC + XBMC + EvenGhost + External Player MPC-HC.

The goal is to control XMBC and my external xbmc player MPC-HC.
I bought a IR reciever and added the MCE plugin in EventGhost. After this I added a (random chosen) CD player to my Logitech HR and renamed it to HTPC. After this I tested to see if Eventghost receives buttonpresses on my Logitech HR and that is indeed so, so this works.
Ok, next thing I want is to control both XBMC and MPC-HC with my HTPC device I created in my HR. In XBMC i only need left, right, up, down, back and enter/select so I could config these keyboard buttons in Eventghost and assign the corresponding remote button to these. But the problem is that I would also need the left, right and enter button for MPC-HC, my external player. Can I config my system in some way that my buttons has a 'double function'? And in a way that when my external player MPC-HC is running and I press eg. enter only MPC-HC responds to this enter at that moment and not XBMC?
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: give a button a 'double function' possible?

Post by Pako »

The same question was discussed in this forum several times.
For example, here:
one button 2 different programs
When you first install EventGhost, it automatically opens the Example.xml file.
Study it! Pay particular attention to Enable exclusive action.

Pako
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

Re: give a button a 'double function' possible?

Post by THX-UltraII »

Thanks for your quick reply Pako.

I ve read the topic but I must admit that it confuses me a little bit. Can you please help me out on my way by saying step-by-step what I need to do exactly in EvenGhost?

I created three folders in Eventghost that I want to use separately. Folder 1 is XBMC, folder 2 is MPC-HC and folder 3 is WINDOWS ACTIONS.
In all 3 folders I created macro's with events (remote presses) but a lot of macro's I created 'overlap' in the other folders. So eg. the EXIT button on my Logitech HR is for Exit XBMC (created in folder 1), Exit MPC-HC (created in folder 2) and Shutdown PC (created in folder 3).

Could you help me on my way maybe?

Thanks Pako
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: give a button a 'double function' possible?

Post by Pako »

Here is a simple example:
SwitchExample.png
You need to reserve one button for toggle your "profiles" (programs).
In the example, this is the event Egon.00.00.3C.
You will certainly have a different event. But you must place it in all three macros.
The macros can also contain command to start the corresponding program.

Pako
Attachments
SwitchExample.xml
(2.03 KiB) Downloaded 222 times
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

Re: give a button a 'double function' possible?

Post by THX-UltraII »

Thanks Pako. The example preview really helps trying to understand what is done by Evenghost.

If I understand correct the PROGRAMS folder with the 3 subfolders XBMC, MPC-HC and WINDOWS are the folders I already made myself correct?
Ok, I understand that I want a RED CROSS on 2 program subfolders in order to only get 1 program subfolder to work.

The SWITCH folder is the folder that should take care of this correct?
My first question is, if I need one button to toggle between my programs, how do I know exactly on which working program evenghost acts at that moment? Isn t it possible in some way to do this automatically (I can imagine that there is a way maybe that Evenghost somehow knows I m in XBMC, MPC-HC or WINDOWS (desktop) so Evenghost switches automatically to that program and disable the 2 other programs?).

What I also do understand is that eg. 'Switch to XBMC' has 'Enable exclusive: XBMC' in it. This makes sense because Evenghost then exclusively uses only the XBMC program folder and disables all other program folders right? What I don t understand is the other 'Enable exclusive', in the macro example 'Switch to XBMC' 'Enable exclusive: Switch to MPC-HC'. Why do I want to switch to MPC-HC if I want the XBMC macro to work exclusive??
And also, where is the Show OSD thing for?

Lot of new questions m8. Thumbs up for your help already!!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: give a button a 'double function' possible?

Post by Pako »

It seems that you're starting to understand how it works.
But right now I'm not going to answer your questions.
First, I need to know that you:
1) You've practically tried (above) example
2) Switching (exclusive enabling) of three program folders works for you
Otherwise it does not make sense.

Pako
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: give a button a 'double function' possible?

Post by zian »

I have my vid progam EG folders dis/enabled depending on what window is on top.
Or by what program was started/closed last.
Just another option.
There are TONS.

If I have a few video windows open I often use the EG Ctrl alt tab macro to scroll through them.
The one I choose is the folder that gets enabled.
eventghost.net
Be there or be square.
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

Re: give a button a 'double function' possible?

Post by THX-UltraII »

Thanks for all input again. I have to say that the option suggested by zian sounds interesting. This way it won t be needed anymore to press the toggle button everytime. I ll try the option suggested by Pako first and report back.
zian, can you already explain in detail how to the 'windows-on-top-method' has to be configured exactly?
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: give a button a 'double function' possible?

Post by zian »

THX-UltraII wrote:...can you already explain in detail...
Nope ;)

But this might help you get started.
(might not too)
Image

Yours, to start, will NOT need most of those actions/configs.
Mine are pretty janked and have been messed with added to for years without doing clean up like I should.
Keep it simple at first. Window open/task created/activated/destroyed etc...enable apps... disable apps etc etc
eventghost.net
Be there or be square.
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

Re: give a button a 'double function' possible?

Post by THX-UltraII »

@PAKO:
I made the configuration you suggested and it works like a charm! Now I completely understand the switch with all macros etc!!
The problem however is that both XBMC and MPC-HC work in some kind of exclusive screen mode so I don t get to see the OSD when toggling. So I might just program 3 buttons on my remote, 1 for MPC-HC, 1 for XBMC and 1 for WINDOWS.

The suggestion by zian still intriuges me but I don t understand how mine should look like. Is there one (simple?) thing I need to do to to give priority to the program that is maximized/on top and disable all other program maps?
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: give a button a 'double function' possible?

Post by zian »

This is what happens in my EG when I start (or it is raised to the top window) in xbmc.
The last two in log is when xbmc is "unraised" from top window.

In the image xbmc is the window directly behind the eg window.

I have one "start/close xbmc" remote control button.
If xbmc is running... xbmc start/close rc button will kill xbmc.
If xbmc is not running... xbmc start/close rc button will start xbmc.
One button both actions...depending.

another...
If, for example, windows media center is top window the wmc eg apps/program is enabled/exclusive and all other apps in the eg apps/program folder (subfolders) are disabled. play/pause/ff/stop etc.... all buttons do the same in each respective video program.... depending in which is on top.

btw...
My event/config tree probably isn't the best to use to cut your teeth on.
My actions and codes are pretty janked and convoluted. But they work for me.... mostly lol

Image
eventghost.net
Be there or be square.
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

Re: give a button a 'double function' possible?

Post by THX-UltraII »

Thanks for your reply zian but I still don t understand what to do exactly in my EG configuration (read what to add exactly).

Maybe you can tell me what to add exactly when you look at the configuration I m using:
Attachments
SwitchExample.png
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: give a button a 'double function' possible?

Post by zian »

See my images?
On the left hand side near top.
Task activated (or created)? You want to drag those over to the right side of config for each switch.
For each type program.

Make sure "log unassigned events" is checked.
Bring any video program to the front (with mouse for example).
The task activated/created type thing will be logged.
Drag the xbmc activated and/or created to the top of your xbmc switch.
Same for all other switches.

That is just the for tasks created.
I think my task destroyed and disable switch deal is nearly the opposite but diffrent macros.
eventghost.net
Be there or be square.
THX-UltraII
Experienced User
Posts: 52
Joined: Tue Feb 24, 2009 7:40 am

Re: give a button a 'double function' possible?

Post by THX-UltraII »

pffff, I m just too noobish I m afraid to understand :(

I only know how to create a FOLDER, MACRO, PLUGIN, EVENT and ACTION in my tree.
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: give a button a 'double function' possible?

Post by zian »

F in Bummer

images/smilies/icon_sad.gif
=
404 (Page Not Found) Error

thx...
Know how to drag and drop?
eventghost.net
Be there or be square.
Post Reply