View Full Version : Best way to create multifunctional buttons?

May 22nd, 2008, 09:59 AM
Hey Guys,

I just started using Girder yesterday, so I'm still pretty new to everything. I have an ATI Remote Wonder Plus setup at home which I've hooked up to Girder.

My goal was to use the remote to control several different media players. I wanted to use the same buttons to control each media player (volume up, volume down) but have a toggle button that indicates which media player I want to control at any given time.

For example, if I hit: (TV) then I want to control Winamp, but if I hit (VCR) I want the volume up and volume down buttons to affect Windows media player.

How I did it: I created the actions for volume up for each of the media player in seperate groups. The event trigger for "Volume Up" functions in each media player is set to the same button on the remote. In addition I created a group called "Media Select" which enables/disables groups when I hit specific buttons.

For example, when I hit the (TV) button, the actions within the "Media Select" group disables the entire "Windows Media Player" group. This way when the Volume Up button is hit, it will only be caught by Winamp.

Is that the right way to go about doing it? Am I making it too complex?

On a side note, it's a ton of fun to play with. I'm nearly done writing an application in C# that interacts with Outlook and sends events to Girder to various applications based on the content of the email. Fun stuff.

Thanks in advance,

Rob H
May 22nd, 2008, 10:03 AM
That sounds right to me.

May 22nd, 2008, 10:59 AM
That's how I set mine up the first time. My preference now is to set a variable when the selection buttons are pressed and attach variable conditionals to certain functions, or use window conditionals. I still keep everything in logical groups. The only advantage is that you don't need to change your entire control set for everything. For example, the volume up and volume down keys do not change function for me whether I'm watching a movie on my TV screen from my PC or from my DVD player, but the play controls do.

May 22nd, 2008, 11:07 AM
Cool. Good to know I'm on the write track.

My first thought was to set variables along the lines of:
if( device == 1)
play action for winamp

if (device == 2)
play action for vlc

so on and so forth but I couldn't figure out how to access/read/write variables. Is it done through the GUI? Is it done by scripting?

Any help would be appreciated in that regard :) (perhaps an example?)


May 22nd, 2008, 07:04 PM
you set the variable using a scripting action, but to check it you can use the lua variable conditional plugin.

May 23rd, 2008, 12:49 PM
Thanks for the info. I'm slowly connecting the dots. I'm sure I'll figure it out :)