Reading Button text
VMarc
Posts: 10
G'day all.
Its probably going to be a short answer but how would I go about reading the text on a button and putting that into a variable? I've got two controllers talking to eachother with one touchpanel keeping tabs on what the other panel is doing.
Example:
Panel A gets pushed and does this one one controller
SEND_COMMAND (10000+tpIdentity):1:77,"'^TXT-2000,0,SYSTEM WARMING'"
//Sends "SYSTEM WARMING" to button 2000 on touch panel (10000+tpIdentity)
but now I essentially want something like...
CHAR alienMSG[50]
alienMSG = READ_BUTTON (10007):1:0,"'^TXT-2000,0'"
on the other TP and controller.
Thanks,
VMarc
Its probably going to be a short answer but how would I go about reading the text on a button and putting that into a variable? I've got two controllers talking to eachother with one touchpanel keeping tabs on what the other panel is doing.
Example:
Panel A gets pushed and does this one one controller
SEND_COMMAND (10000+tpIdentity):1:77,"'^TXT-2000,0,SYSTEM WARMING'"
//Sends "SYSTEM WARMING" to button 2000 on touch panel (10000+tpIdentity)
but now I essentially want something like...
CHAR alienMSG[50]
alienMSG = READ_BUTTON (10007):1:0,"'^TXT-2000,0'"
on the other TP and controller.
Thanks,
VMarc
0
Comments
why not just send the exact same command to a virtual device on the other master and parse it that way? That way you avoid the middle-man (that being the tp.)
Scenario: Panel B remotely connects to rooms to offer support to the users. Without creating a local 'database' on B, I would like the panel B and/or controler B to reiceve a variable based on the room setup. Is it an LCD TV or a projector? I currently use a lot od DO_PUSH and some "OFF/ON[(10000+(TpIdentity)):1:77,1]" from one to the other as flags but that just seems wrong to me.
Thanks
VMarc
I'd use Master to Master communications and a shared comm virtual device on each master to pass information.
So, for example on master A
// something happened - Index now equals a new value
send_command vdv_other_master_virtual,'Index now equals:50'
then on master B
data_event[...
command:
{ if(find_string ... 'Index now equals:'...
// parse for value
Index=parsed_value
Commands are for send, stings are for receive.
That's how I'd do it. I'd obviously come up with a better protocol but this is just an example to show the idea of how it works.