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.

Command Jump to and Activation exculsive

If you have a question or need help, this is the place to be.
Post Reply
Bob
Posts: 40
Joined: Sun Oct 22, 2006 5:46 pm

Command Jump to and Activation exculsive

Post by Bob »

First of all, i want to thank you for your developpment of this program.
Today i'm trying to replace my Girder configuration with an Event Ghost configuration.

But i've got a problem. I'm using a directory which contains all my ir codes (usb -uirt). Each command has " jump to" commands (with the "always" and "return" option) which call other commands for different applications.

Those application commands are contained in different directories which are switched according to the effective application by the command "enable exclusive".

But the problem is that even if the directory is disabled, the macro-command is executed by the command "Jump to". The only way is to disable/enable all macro commands of the directory. I think it's not a good solution. The reason is that this system allows an easy management of the remotes and prevent to repeat ir events for each command in the
tree.

Not sure to be understood, sorry for my English , i'm a french user.

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

Post by Bitmonster »

I'm not sure if I understand you correctly.

First the general rule is:
If an "event" matches an "event item" in the tree and all of its parents are enabled, it will start to execute the macro it is assigned to.

So following this rule, it will execute every item that is directly "jumped-to" after this.

Especially for configurations like yours, it was chosen this way, because many people prefer to put all their IR transmit actions in one folder and to jump to them. But if you do a jump, you normally know if you want to send or not, and take this decision before in the macro that gets triggered (or not if it is in a disabled folder). And since such configurations normally "re-use" the IR actions, they normally never get disabled.
Bob
Posts: 40
Joined: Sun Oct 22, 2006 5:46 pm

Post by Bob »

Thanks for your answer,
Bitmonster wrote: But if you do a jump, you normally know if you want to send or not, and take this decision before in the macro that gets triggered (or not if it is in a disabled folder).


Precisely not. My configuration is built in that way : when ir event is triggered all the command are jumped to . But i want that only the active commands are executed. I shared an exemple of my configuration here.

I use this config because i found that it was useful and easy to maintain with Girder (which allow this system). But perhaps i go wrong and better system exists.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Well, it might be, that you might find yourself more comfortable the way you did it in Girder, but actually I find this way unneeded complicated. Girder does not have the concept of "enabling exclusives" and therefore you had to use some ways, that you don't ever need in EG.

I would simply build applications folders the way it is shown in the example.xml and assign the events inside them. Then you can decide what has to be done much "nearer" to the application configuration than the way you have tried and it is much simpler to maintain and extend.

BTW: You can also map the cryptic USB-UIRT events to more readable ones and also merge different codes to a single event:
http://www.eventghost.org/forum/viewtopic.php?t=34
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

To make it more clear what I mean, here is your configuration re-arranged the "EventGhost way". As you can see, there is no need for any jumps at all and you don't need any intermediate macros. The downside is, that you might have to assign events multiple times, but as said before, you can merge them before, so you only have readable events like "USB_UIRT.Up" and this is much more readable than jumping around.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="780">
    <Folder Name="switch">
        <Macro Name="Enable exclusive: ZoomPlayer">
            <Action>
                EventGhost.EnableExclusive(XmlIdLink(45))
            </Action>
        </Macro>
        <Macro Name="Activation exclusive: Xlobby">
            <Action>
                EventGhost.EnableExclusive(XmlIdLink(32))
            </Action>
        </Macro>
        <Folder Name="application">
            <Folder Name="Xlobby" id="32" Enabled="False">
                <Macro Name="up" id="33">
                    <Event Name="USB_UIRT.1300000B2EFC">
                    </Event>
                    <Event Name="USB_UIRT.150000330BC0">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 1 up', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                    <Action>
                        EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
                    </Action>
                </Macro>
                <Macro Name="down" id="36">
                    <Event Name="USB_UIRT.150000310BC0">
                    </Event>
                    <Event Name="USB_UIRT.130000092EFC">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 1 down', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                    <Action>
                        EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
                    </Action>
                </Macro>
                <Macro Name="left" id="39">
                    <Event Name="USB_UIRT.150000370BC0">
                    </Event>
                    <Event Name="USB_UIRT.1300000F2EFC">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 1 left', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                    <Action>
                        EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
                    </Action>
                </Macro>
                <Macro Name="right" id="42">
                    <Event Name="USB_UIRT.170000D80BC0">
                    </Event>
                    <Event Name="USB_UIRT.150000382EFC">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 2 right', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                    <Action>
                        EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="ZoomPlayer" id="45">
                <Macro Name="up" id="46">
                    <Event Name="USB_UIRT.1300000B2EFC">
                    </Event>
                    <Event Name="USB_UIRT.150000330BC0">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 2 up', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                </Macro>
                <Macro Name="down" id="48">
                    <Event Name="USB_UIRT.150000310BC0">
                    </Event>
                    <Event Name="USB_UIRT.130000092EFC">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 2 down', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                </Macro>
                <Macro Name="left" id="50">
                    <Event Name="USB_UIRT.150000370BC0">
                    </Event>
                    <Event Name="USB_UIRT.1300000F2EFC">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 2 left', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                </Macro>
                <Macro Name="right" id="52">
                    <Event Name="USB_UIRT.170000D80BC0">
                    </Event>
                    <Event Name="USB_UIRT.150000382EFC">
                    </Event>
                    <Action>
                        EventGhost.ShowOSD(u'App 2 right', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
                    </Action>
                </Macro>
            </Folder>
        </Folder>
    </Folder>
</EventGhost>
Bob
Posts: 40
Joined: Sun Oct 22, 2006 5:46 pm

Post by Bob »

The solution you advise me in the post seems to be the good one.

Thanks
Post Reply