PDA

View Full Version : Confused about how Rules work for a button


FearTheDentist
October 24th, 2005, 04:05 AM
Hi- I'm trying to change the image displayed for the mute button for my receiver depending on a variable passed from G4. I can easily do it by toggling the value of a variable in NR, but this can get out of sync with the receiver. Since I use serial control for my receiver G4 is always in sync with the receiver, so it makes more sense to me to use feedback from G4 to toggle which image is shown. I just can't quite figure out how to do it. In G4 I use NetRemote.SendLabel to return 'DenonMuteState' with a value of either "ON" or "OFF". I tried making a rule "DenonMuteState" is "ON" but no luck- am I not able to use string values for a rule? If not, I'm sure there is an easy way to do this, but I'm not having any luck finding it. Can anyone help? Thanks!

Ben S
October 24th, 2005, 06:16 AM
Yes, the basic rule state can only be a number, so you should send 0 or 1 for off and on.

Or, you can use lua, with script like this...


return(NetRemote.GetVariable('DenonMuteState') == 'On');