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.

Macro with Trigger Events followed by other actions

If you have a question or need help, this is the place to be.
Post Reply
rdgerken
Experienced User
Posts: 89
Joined: Fri Sep 21, 2012 7:41 pm

Macro with Trigger Events followed by other actions

Post by rdgerken »

OK, another noob question here.

I have a macro that has several "Trigger Event" actions in it - to kick off other macros that have my actions programmed (so that I don't have to duplicate these actions in multiple places, that is, I want to reuse actions I have already created in other macros), and then I have some other actions below these "Trigger Event" actions. Essentially, what I'm seeing, and is probably by design, and that is, the Trigger Event actions just get queued up, and when this macro that I'm in finishes, then it goes out and runs those macros - so this causes a problem for me, in that, I need this macro's actions to complete AFTER the other ones that I trigger. Is there a way to force EG to process the event queue before running these final actions in my macro? If not, what is the correct way to do what I'm trying to accomplish? All I really want to do is reuse Actions from other macros, so that I don't have to create the same actions in multiple places. (These are plugin actions that have complex parameters pre-configured)


MacroA
--EventA
--Trigger Event X Action
--Trigger Event Y Action
--Trigger Event Z Action
--Do something Else Action R
--Do something Else Action S
--Do something Else Action T

So in my example here, I want X, Y, Z, R, S, T - but what I get is, R, S, T, X, Y, Z

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

Re: Macro with Trigger Events followed by other actions

Post by Pako »

I do not understand something (maybe).
Your situation is not very clearly visible.
You would be better to use images or attach a simplified configuration file (xml).
However, I will try to give you some advice.
1. Take into account that the same event can be used in more macros.
Order of execution of macros is then determined by their position in the tree. Macro, which is located in the tree above is done earlier
(you can imagine that the event "falls" from top to bottom and all the way performs assigned macros).
2. Take into account that one macro can be triggered by more different events.
3. I think that in fact you do not need to run 3 events (X, Y, Z). That should be enough to use only one event (X).
4. Split the A macro into two macros (A1 and A2). That event, which is triggered in A1 macro (probably X), assign to the macro A2 also.
Macro A2 place in the tree as low as possible.

Pako
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Macro with Trigger Events followed by other actions

Post by jonib »

rdgerken wrote:All I really want to do is reuse Actions from other macros, so that I don't have to create the same actions in multiple places. (These are plugin actions that have complex parameters pre-configured)
Can't you use Eventghost\Jump action to trigger the other macros? Instead of creating new events.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
rdgerken
Experienced User
Posts: 89
Joined: Fri Sep 21, 2012 7:41 pm

Re: Macro with Trigger Events followed by other actions

Post by rdgerken »

Guys,

Thanks for the help. Unfortunately, I don't think jump will work either. I would need to Jump Back to my original macro, and it would start over, and I don't want that. It would need to pick up where I jumped out when I return.

Pako,

Here is what I'm trying to do.

In my screenshot, the problem is, that because of the way the events are queued up, MoreComplicatedActions runs before ComplicatedAction1 and ComplicatedAction2. How can I achieve what I'm trying to do, without having to make copies of the "ComplicatedAction1" and "ComplicatedAction2".
Attachments
Screenshot
Screenshot
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Macro with Trigger Events followed by other actions

Post by jonib »

rdgerken wrote:Thanks for the help. Unfortunately, I don't think jump will work either. I would need to Jump Back to my original macro, and it would start over, and I don't want that. It would need to pick up where I jumped out when I return.
Have you tested the Jump action? as it has an option to go back and continue to the next action.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Macro with Trigger Events followed by other actions

Post by Pako »

I agree with jonib.
In this case, the Jump action with return is a correct solution.
I thought that you have some reason why you do not use the Jump action, but Trigger event action.
You definitely can see, that screenshot is much more illustrative than your description in the first post.
In addition, there are unfortunately no mention of the Wait action.

Pako
rdgerken
Experienced User
Posts: 89
Joined: Fri Sep 21, 2012 7:41 pm

Re: Macro with Trigger Events followed by other actions

Post by rdgerken »

Thanks guys.

I will give the jump action a shot. I love EG, I do... but man, there is quite a learning curve.

*Update - The jump action works perfectly for this. Thanks again for the tip.

I appreciate the kind help.
Post Reply