Call events as a command - reuse of commands

Help each other out

Call events as a command - reuse of commands

Postby jbretsch on Thu Nov 16, 2006 5:11 pm

I have a number of buttons

I have 5 buttons. When I press any of them i want the same 3 commands executed+1 command that is specific to the button

Example:
When executing the DVD event
The commands are:
Projector On
Audio system on
Change to surround mode
change source to DVD

When executing the TV event the first 3 commands are the same but the 4th is different

So basically I would like to have a command which will call another event

One event called Prepare Video with
'Projector On'
'Audio system on'
'Change to surround mode'

the DVD will then be
'prepare video'
'DVD'

TV will be
'Prepare video'
'TV'

If I change my receiver or projector, i only have to edit 'prepare video' and everything will work again
jbretsch
 
Posts: 33
Joined: Mon Sep 04, 2006 3:50 pm

Postby bmblank on Thu Nov 16, 2006 5:30 pm

What you want to do is create an event for each button. Each event can be made up of multiple commands.
bmblank
 
Posts: 233
Joined: Fri Jun 30, 2006 12:55 pm

Postby P3rv3rt B3ar on Thu Nov 16, 2006 7:08 pm

No, i think he needs possibility to call event within an event. I think Steven added command for this shortly before he became active in development of xl3. Im not exactly sure cause im personally still using call command in xPerT which does this too.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby bmblank on Thu Nov 16, 2006 7:42 pm

I see... I think it'd probably be easier to make 2 separate events.
One being
'Projector On'
'Audio system on'
'Change to surround mode'
'DVD'
and one being
'Projector On'
'Audio system on'
'Change to surround mode'
'TV'
An event calling an event would be pretty neat though.
bmblank
 
Posts: 233
Joined: Fri Jun 30, 2006 12:55 pm

Postby jbretsch on Thu Nov 16, 2006 9:02 pm

P3rv3rt B3ar is right. I was using a simplified example to make my case. I have 8 buttons all calling the same 7 commands + 2-3 others and it is painfull to have to change all of them everytime I adding a similar button, another audio or video source (or just getting smarter about what I want the buttons to do)

I saw a "RUN EVENT" Command on one of the XML files of the TSI skin with 2 parameters, but I cannot find the command under F2/setup. I wonder if that is the solution?
jbretsch
 
Posts: 33
Joined: Mon Sep 04, 2006 3:50 pm

Postby bmblank on Thu Nov 16, 2006 9:34 pm

I can see where that would save time and a huge pain in the ass. I hope you find something.
bmblank
 
Posts: 233
Joined: Fri Jun 30, 2006 12:55 pm

Postby P3rv3rt B3ar on Thu Nov 16, 2006 11:35 pm

jbretsch wrote:
I saw a "RUN EVENT" Command on one of the XML files of the TSI skin with 2 parameters, but I cannot find the command under F2/setup. I wonder if that is the solution?


Try to update your .exe (but please copy your older one for safekeeping, cause so many here are saying newest is buggy so u can always backtrack using that)

If that doesnt help, u can always check out xPerT and its call command too. (also xevent does this, but if i remember right it has few second wait)
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby jbretsch on Fri Nov 17, 2006 2:05 am

nice! just dl the latest EXP and 'Run event' is there. if it is stable I am in business...

one more Q: How do I get the button ID and state of the button that triggered the event? such as%buttonid% or similar. I would like to be able to use the buttonid as ar part of the name of the event i am calling
jbretsch
 
Posts: 33
Joined: Mon Sep 04, 2006 3:50 pm