View Full Version : Using LUA to enable/disable a group

September 3rd, 2008, 03:29 AM
I know its probably obvious! But I can't find the lua command to enable/disable a group.

Can someone help me?



Rob H
September 3rd, 2008, 06:53 AM
I thought there was a way to do this, but it's not in the help.

I'd suggest setting up an action in the GML and using gir.TriggerEvent() to run it.

September 3rd, 2008, 10:24 AM
This was discussed in the past, but unless something was introduced into one of the versions and not announced, there is no way of using lua to enable or disable a group.
I remember this because I requested it (a couple of years ago?). :D

September 5th, 2008, 04:53 AM
Thanks guys

I take it that Girder 5 will not give me this either?

While we are on the subject is there a 'easy way to migrate from Girder 4 to Girder 5' guide somewhere?


Rob H
September 5th, 2008, 07:27 AM
G4 to G5 should be mostly painless.

Certainly a lot less painful than G3 to G4.

The workaround I gave using gir.TriggerEvent to trigger an action will certainly work for both.

September 5th, 2008, 09:37 AM
Thanks Rob

Can I just load the gml from G4 into G5 without any changes then?

Is there a side by side comparison between the two I can look at?

I was hoping I could move more of my code to Lua.

The group enable/disable is mainly due to using the same remote for different things. Is there another more creative way of controling this, other than raising an even to do the enable/disable?

Can I move all the remove commands completely into Lua? If so do you have an example?


Group 1 :

Remote press 1 - do action 1a
Remote press 2 - do action 2a

Group 2:

Remote press 1 - do action 1b
Remote press 2 - do action 2b


Rob H
September 5th, 2008, 12:43 PM
GMLs should load fine.

I'm not sure we have a side-by-side comparison - Ron?

You could probably use a conditional of some kind rather than enabling/disabling the group, e.g. if you're controlling one of several programs that way then you could attach a window conditional to each group.