PDA

View Full Version : Can I use an alias to a IR command



nac
April 12th, 2004, 03:06 PM
I am currently building a htpc and am very new to Girder, I need a little help please.

So far I have around 10 application groups, which will automatically enable when the app is in the forground.
I have build a basic IR receiver/tramsmitter and have winlirc working.

I now need to associate the remote buttons to all of the application controls. Can I create a single group with all of the remote buttons and learn the IR codes for those. Then in each of the application commands learn an alias to the remote button instead of having to learn the IR code into every command.
That way if I later change the remote or setup a netremote pda I only have to learn one group.

NAC

Promixis
April 12th, 2004, 04:02 PM
Yes you can do this. It will be core feature in Girder 4...

I would use the lua command TriggerEvent ("eventname",18)

then attach events to your commands.

ie TriggerEvent ("Play",18)

Then attach the eventstring by using Learn/Girder Event and type in the name.

NOTE: Case sensitive!

nac
April 12th, 2004, 04:45 PM
I not sure how to get this to work.

I have a group called remote.
In that group I add all of the commands (ie. buttons that exist on that remote).
I learn the winlirc IR codes into each of the commands.

In the application groups I add all of the commands that each app requires. Instead of learn "all" I learn a "girder event", then type in the triggerevent name.

But how do I give each of the remote commands the lua triggerevent names.

Thanks.
NAC

nac
April 12th, 2004, 06:08 PM
I got it working.

On each command I go into the Variable manipulation script under the girder tab.
I then click the "Script" button.
Entered :- TriggerEvent ("Power",18)

The trick was to use a device of 18. It tool me hours to find that.

I wish the online help explained it better!


Thanks.

nac
April 12th, 2004, 08:04 PM
Ok, I have another small problem.

If I standby and then resume the PC the last command executed refuses to work again until I press a different button. To explain a bit more:-
If I press the "power" button on the remote it puts the PC into standby. I then wake up the PC. If I then press the same "power" button but I get no events received in girder until I press another button then the "power" button will work again.
This happens with any button.

I just found a work around. I added a multigroup so on ResumeSuspend I disable and then enable the winlirc plugin device.

Thanks.
Nac