Page 1 of 1

Multi-device multi state buttons

Posted: Thu Mar 04, 2004 3:45 pm
by acheslow
I can probably figure out how to do this with a script and/or additional devices and tasks but it would be nice if the multi-state buttons could change a property belonging to a different device than the one its state reflects.



In other words, if DeviceA.Property1 state = X then change DeviceB.Property2 to Z when the button is pressed.



Specifically, here's what I'm trying to do: I have an External Control device with a property 'Zoom Player.ZP_State' which shows whether Zoom Player running on another machine is playing or paused. I can also set a Girder Bridge device property 'Girder.Event String' to 'event_play' to cause Zoom Player to play or 'event_pause' to cause Zoom Player to pause. I would like to have a multi-state button that shows a Play symbol when 'Zoom Player.ZP_State' = 'Playing' and a Pause symbol when 'Zoom Player.ZP_State' = 'Paused'. But when the button is pushed I want to set the 'Girder.Event String' appropriately.



Thanks!

Alan

Posted: Fri Mar 05, 2004 12:12 pm
by ScottBot
As a workaround, if you don't care about having the separate button UP and DOWN images for a button, you could lay a transparent button over an image control. The Image control can display the states for the Zoom Player, and the button can send messages to Girder.

Posted: Fri Mar 05, 2004 12:18 pm
by acheslow
Thanks Scott, I did think of that earlier but the transparent image still couldn't send different messages to Girder depending on the state of the ZP device.



Actually for this particular situation I suppose I could send a 'play' command to ZP because it happens to toggle between play and pause but in other situations this wouldn't work. My workaround for now was just to have separate play and pause buttons, each sending their own separate commands, plus another multi-state button just to indicate whether ZP is playing or not.



Thanks, Alan