New event "Trigger Event"

Got an idea, post it here

New event "Trigger Event"

Postby bfauska on Sun Sep 10, 2006 7:56 pm

I have many events that I need to use the same string of commands with only slight variations. If I could have one event that did several of those commands and then link from another event to that one it would make my skinning much easier.

For example I have to use a string of about 11 commands to have my DVD changer call up a specific disk from my changer and then clear the OSD. If I want to add trailers before the move sometimes and not others I need to make two different events with these 11 commands plus any others that are required to change inputs on my projector and reciever and then adjust the aspect ratio of the projector, and all sorts of other things so I end up with an events list that is full of events that are 10, 15, 20 or 30 commands long.

If we could link to one macro event for each of the tasks that the other event needed it would cut skinning time way down and make a much cleaner event list to use.

Thanks for considering my request.
Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby DaveG on Sun Sep 10, 2006 8:14 pm

I'll second that request
DaveG
 
Posts: 15
Joined: Fri Aug 04, 2006 6:07 am
Location: Milton Keynes, UK

Postby P3rv3rt B3ar on Sun Sep 10, 2006 8:20 pm

All u need is use "call" command in xPerT. It will launch specified event. Since u have xPerT already installed its gonna be walk in park... just look what i mentioned about syntax of that particular command on xPerT thread...

EDIT: Actually on web page trough the link in first post on xPerT thread.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby bfauska on Sun Sep 10, 2006 9:35 pm

P3rv,
I'll check that out, but I still think it would be a nice (and seemingly simple) addition to the core of xlobby. I think we should be able to do as much as possible (at least for the basic types of things, like navigation and user interface) without relying on plugins.

Thanks,
Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby P3rv3rt B3ar on Sun Sep 10, 2006 9:48 pm

I have to say in general i disagree with u, i think core should perform just its duty, being frontend, and nothing more. Specificly on this function however, i agree with u, it should be part of core, it falls on cores duty.

However, i didnt want to wait so i implemented it to myself, unknown to me at the time, it was implemented atleast on one plugin before (allthough with few seconds wait, there is no wait in xPerT, but obviously it is somewhat slower than it would be as implemented to core). Now would it be reasonable to Steven spend time implementing something which already is available... im not too sure...

Anyhows, if u try out feature in XperT, after u have changed events u have to either restart xlobby, or reinit xPerT (there was some command for that, i cant remember name) so that changes u made to events are taken into count.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby badubo on Mon Sep 11, 2006 8:36 am

I thing that this feature should be very interresting for plugins development.
Actually, calling events from plugins is done by parsing the eventgroup and then call each internal command individually. (at least with XRemote)
The main problem is that we cannot mimic the way XLobby handles the threading behaviour. so we cannot garranty to have the same result as if it was triggered externally.
If we can have access to a command that can call events, we can bypass this issue.
The possibility to call it synchronous or asynchronous should be also interresting
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby bfauska on Tue Sep 12, 2006 4:24 am

I was thinking that it would also make it more easy to do complex events with the wait command, like if I want to have some commands happen in sequence, but some of them wait and others not wait, I could structure them into their own events and then trigger them as I please from another "master" event.

I am glad this seems interesting to people, if it is easy to add hopefully Steven will add it soon.

Later,
Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby stevenhanna6 on Thu Sep 14, 2006 12:47 am

something like this is very easy to add took me all of 5 min to program and test it, its just referencing other events.

-"xlobby>run event" added, used to call predefined events from within another event

http://www.xlobby.com/xlobby2.zip
stevenhanna6
 
Posts: 904
Joined: Tue Feb 18, 2003 10:39 am
Location: Ontario, Canada

Postby bfauska on Thu Sep 14, 2006 5:39 am

Steven... You Rock. That will save me sooooo much ir programming time.


Thank you very much.

Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby badubo on Thu Sep 14, 2006 8:31 am

Thanks Steven,

Just one question, if called from a plugin, what about the threading issue?
is the event completely finished when returning from sendcommand, or is it only initiated with a separated thread?
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby badubo on Fri Sep 29, 2006 6:08 am

It seems that calling this command from the plugin has not the same effect that if it was triggered by xlobby (from a button) mainly with the use of the command wait (multithreading issues)

Any hints?
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby badubo on Mon Oct 02, 2006 7:30 am

bump :oops:
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby BaddaBing on Mon Oct 02, 2006 1:16 pm

Additional glitch - the event name is not working when passed a variable.
BUMP +1
BaddaBing
 
Posts: 557
Joined: Fri Mar 26, 2004 2:39 pm
Location: DFW Texas

Postby C-moi on Mon Oct 02, 2006 3:43 pm

+1
C-moi
 
Posts: 164
Joined: Fri Apr 23, 2004 6:58 am
Location: France

Postby dgemily on Wed Oct 04, 2006 7:14 am

+1 ;)
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France