UIRT trigger depending on current screen

Help each other out

UIRT trigger depending on current screen

Postby S Pittaway on Wed Apr 05, 2006 4:44 pm

Hi,

I got my usb uirt today and its now up and running :)


I want to be able to change what is triggered by a remote key press depending on what screen i am on

ie. pause on a music screen pauses winamp, when on the dvd screen it pauses theartertek etc....

I dont need girder so i am loather to buy that...

Is there an easy way of doing what i want?

Failing that, how do you detect remote presses from inside a plugin?

Any help would be appraiated :)

Cheers sean.



Ps Sory about the spealing...
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby m_masta on Wed Apr 05, 2006 5:09 pm

You can do that, but will need Girder and the very nice plugin called Xremote (look in plugin forum for info). That is exactly what Xremote is designed to do, control different screens with a remote. Here is a tutorial for it: http://france.xlobby.com/xremoteus.htm
You can use it with the last free version of Girder (3.3 I think). I'm not sure where you can find it, but a basic web search should lead you to it.
m_masta
 
Posts: 125
Joined: Fri Mar 11, 2005 5:41 am
Location: Houston, TX

Postby S Pittaway on Wed Apr 05, 2006 5:18 pm

i had a look at girder, but it just seems to be another program running that i dont really need...


I just found the xusbuirt plugin source code, so its not a big deal to hack up something that will do what i want, i just thought someone else would have already done it

and been to cheap to get girder :)
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby m_masta on Wed Apr 05, 2006 5:32 pm

S Pittaway wrote:i had a look at girder, but it just seems to be another program running that i dont really need...


I just found the xusbuirt plugin source code, so its not a big deal to hack up something that will do what i want, i just thought someone else would have already done it

and been to cheap to get girder :)

If you do manage to hack something, be nice and share with others :P

masta
m_masta
 
Posts: 125
Joined: Fri Mar 11, 2005 5:41 am
Location: Houston, TX

Postby art on Wed Apr 05, 2006 6:11 pm

You don't need girder to use xremote plug-in (which is your best friend for usage with remote :) ). Girder does nothing more, than sending message to xremote which you can do with "send message" command in Xlobby. Those "send message" events can be triggered with xusbuirt plug-in.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby m_masta on Wed Apr 05, 2006 6:35 pm

art wrote:You don't need girder to use xremote plug-in (which is your best friend for usage with remote :) ). Girder does nothing more, than sending message to xremote which you can do with "send message" command in Xlobby. Those "send message" events can be triggered with xusbuirt plug-in.

Can you explain how you go about doing it?
I think I understand conceptually what you mean. Girder is simply sending a response to a given remote key press, and Xremote is "listening" for Girder's responses. So the trick is to configure xusbuirt so that it sends out the same message expected with a given remote key press to Xremote plugin.
... so how do I do it :D
m_masta
 
Posts: 125
Joined: Fri Mar 11, 2005 5:41 am
Location: Houston, TX

Postby art on Wed Apr 05, 2006 7:29 pm

The whole thing is kind of backwards, but like S Pittaway said Girder is just another program running and I wanted to eliminate it from my setup (I’m fighting now with xusbuirt and short burst IR codes problem, but that’s between me and xusbuirt :wink: ).
So, to do it, you first need to setup xremote and export your gml file.
In xusbuirt you’ll need to create device with your buttons and teach it IR codes from your remote.
Next, setup events for each button with command “Send Message”, here your values should be:
- for window name (I’m not at home now, so I’m not 100% sure) use “XRemoteWnd” – this name should be in gml file
- next argument is ‘message’ I think, use “WM_COMMAND”
- for wparam and lparam arguments use values from gml file, they should be something like “44444” and “1” or “2” or “3” …...
Those events should have (you’ll need to assign them) IR triggers from your IR device.

And that’s all :D , I hope it make sense. I know it sounds complicated and it’s a lot of work, but…

If you’re interested and want to wait few hours, when I get home, I can post a little tool I wrote that will do most of the work for you; all you’ll need to do is generate gml file and teach xusbuirt IR codes from your remote; tool will create all events and corresponding device for xusbuirt.

Let me know…
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby m_masta on Wed Apr 05, 2006 7:51 pm

I think the tool would probably benefit a whole lot of people (me included). So yeah, go ahead and post it when you get time :P
I understand the process, in essence you're making Xremote think it's getting the commands from Girder, when you are in fact sending them through Xusbuirt. Seems to me Xremote can be rewrote to work directly with Xusbuirt.
m_masta
 
Posts: 125
Joined: Fri Mar 11, 2005 5:41 am
Location: Houston, TX

Postby art on Wed Apr 05, 2006 8:26 pm

I think badubo already did that .. I just re-red his post for xremote where he says:

"- possibility to export a xlobby eventsgroup containing an event for each button. This feature is for simplifying the configuration of the USB-UIRT plugin. (Not completely Tested). You only have to learn these evets and let the plugin make the dispatch "

I'll have to check it out. Now I feel stupid :oops: it looks like I was trying to reinvent the wheel...
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby m_masta on Wed Apr 05, 2006 8:42 pm

art wrote:I think badubo already did that .. I just re-red his post for xremote where he says:

"- possibility to export a xlobby eventsgroup containing an event for each button. This feature is for simplifying the configuration of the USB-UIRT plugin. (Not completely Tested). You only have to learn these evets and let the plugin make the dispatch "

I'll have to check it out. Now I feel stupid :oops: it looks like I was trying to reinvent the wheel...

You are right,
I read this in the Xremote thread:
"If you are using USB-UIRT plugin, press “export events” instead of “export gml” then you only have to learn these events and let the plugin make the dispatch. "

Cool, you read and you learn :o

The export to Girder (.gml) is necessary though for all people who are not using a USB-uirt, but another remote system not natively supported in Xlobby. So the answer to the original question is:
you only need Girder if you don't have a USB-uirt device.
m_masta
 
Posts: 125
Joined: Fri Mar 11, 2005 5:41 am
Location: Houston, TX

Postby dgemily on Wed Apr 05, 2006 8:47 pm

hep guys, I didn't try but I think that you don't need to use girder with xremote if you use it with an usb-uirt...
Image

click on "Export Events" then place the xml file in your eventgroups repertory.
restart to xlobby then open the evengroups in the event manager, you will see the list of events(=buttons)
so learn a trigger for every events/buttons ...

I can't try right now and I never test it, but if my mind is right, that should work like this....

later.
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France

It is already built in to Xlobby

Postby timwarner on Wed Apr 05, 2006 8:52 pm

I asked about this before

http://xlobby.com/forum/viewtopic.php?t=2958&highlight=

I received this answer from Steven

stevenhanna6 wrote:
I think it would be useful to have same command from the same remote control do different things depending on the current screen.


just wanted to say this should be possible now, but there is a catch...the command must be present on that screen. So you have multiple commands with the same trigger right, xlobby will first check the actual screen for commands that have that trigger...so making a hidden button with the command you want would do it. At least thats how I remember it worked.


This is how I use my remotes and it works very well.
timwarner
 
Posts: 58
Joined: Thu Feb 17, 2005 9:56 pm
Location: UK

Postby S Pittaway on Thu Apr 06, 2006 10:28 am

thats sounds fine but how does xlobby decide what event to link to when no button is pressent?
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby S Pittaway on Thu Apr 06, 2006 12:52 pm

xremote works a treak. no need for girder... and no need to re-invent the wheel :)


english guide is here http://france.xlobby.com/xremoteus.htm
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby dgemily on Thu Apr 06, 2006 4:43 pm

S Pittaway wrote:xremote works a treak. no need for girder... and no need to re-invent the wheel :)


english guide is here http://france.xlobby.com/xremoteus.htm


Yep, I’m happy to hear that …. this topic gave me a doubt!!!

you need girder only if your are not using an usb-uirt....
dgemily
 
Posts: 793
Joined: Thu May 13, 2004 6:24 am
Location: Paris, France