Multi-state General Question
mjones2620
Posts: 86
Guys:
I have a set of buttons with three states. I'd like to be able to light up the buttons based on conditional statements, but I can't seem to get it to work right.
State 1 - off (white)
State 2 - Blue
State 3 - Red
For whatever reason, when I use Send_Level nothing works, and when I assign the button to either 1, 2, or 3 I only get 3 no matter what. Am I missing something?
Matt
I have a set of buttons with three states. I'd like to be able to light up the buttons based on conditional statements, but I can't seem to get it to work right.
State 1 - off (white)
State 2 - Blue
State 3 - Red
For whatever reason, when I use Send_Level nothing works, and when I assign the button to either 1, 2, or 3 I only get 3 no matter what. Am I missing something?
INTEGER nCAL_STATE[] ={ 1, 2, 3 } FOR(x=1; x<=MAX_LENGTH_ARRAY(uMTG); x++) { IF(LENGTH_ARRAY(uMTG[x].cID) > 0) { IF(uMTG[x].cID == uMTG[x].cID) { START_INDEX = fnPROCESS_TIME(ATOI(uMTG[x].cSTART_HOUR), ATOI(uMTG[x].cSTART_MINUTE)) END_INDEX = fnPROCESS_TIME(ATOI(uMTG[x].cEND_HOUR), ATOI(uMTG[x].cEND_MINUTE)) START_TIME = fnPROCESS_INDEX(START_INDEX) END_TIME = fnPROCESS_INDEX(END_INDEX) IF(uMTG[x].cLEVEL == "'Classified'") { [dvTP_Locked, x] = nCAL_STATE[3] } ELSE IF(uMTG[x].cLEVEL == "'Unclassified'") { [dvTP_Locked, x] = nCAL_STATE[2] } IF(x == START_INDEX) { SEND_COMMAND dvTP_Locked, "'^TXT-',ITOA(START_INDEX),',0,',uMTG[START_INDEX].cSUBJECT, ' (', DATE,' ',START_TIME,' - ',END_TIME,')'" } } } ELSE { OFF[dvTP_Locked, x] SEND_COMMAND dvTP_Locked, "'^TXT-',ITOA(x),',0,'" } }
Matt
0
Comments
To send a multistate general button (non-level type) to a certain frame/state you can use the ^ANI command.
Assuming the button has vtext address 100, this command will force it to show state #2: