Home AMX User Forum NetLinx Studio

Changing Text Color via ^BMF Command

Alright, here's a particularly simple bit of code:
switch(nState) {
  Case 0:
	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TOff%CT White'";
  Case 1:
	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TAuto%CT FF6AFBFF'";
  Case 2:
	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%THeat%CT FF6B6AFF'";
  Case 3:
	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TCool%CT 7BC1FDFF'";
}
What's confusing me is that the CT command is definitely not using the color I'm providing... sort of. The first case does work, the second and third go to a black that's almost completely transparent, and the fourth case goes to a strong orange color... I can't even figure how you get orange out of a blue hex! I thought that maybe the latter "FF", for the opacity, wasn't being processed correctly, but upon removing it there was no difference in the slightest between colors.

Heh, this is one of those issues that just seems so simple it feels a waste of time to be even thinking about it; am I missing something?

Thanks!

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    Try removing the space between %CT and the information. For example:
    switch(nState) {
      Case 0:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TOff%CTWhite'";
      Case 1:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TAuto%CTFF6AFBFF'";
      Case 2:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%THeat%CTFF6B6AFF'";
      Case 3:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TCool%CT7BC1FDFF'";
    }
    

    Jeff
  • Update:

    I also tried the following, thinking that perhaps it wanted an explicit hex code:
    send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TAuto%CT ',$FF6AFBFF";
    
    But I noticed in the Notifications that it was only sending "$FF" at the end of the command - somehow and for some reason dropping the rest of the hex code... or something. Hrumph.
  • Spire_Jeff wrote: »
    Try removing the space between %CT and the information. For example:
    switch(nState) {
      Case 0:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TOff%CTWhite'";
      Case 1:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TAuto%CTFF6AFBFF'";
      Case 2:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%THeat%CTFF6B6AFF'";
      Case 3:
    	send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TCool%CT7BC1FDFF'";
    }
    

    Jeff
    No such luck, unfortunately - I still get white, black, black, orange, respectively. I even tried dropping the latter opacity hex without the space, but it would seem that the space makes no difference. :(
  • Spire_JeffSpire_Jeff Posts: 1,917
    Did you try:
    send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TAuto%CT#FF6AFBFF'";
    

    Jeff
  • AMXJeffAMXJeff Posts: 450
    No such luck, unfortunately - I still get white, black, black, orange, respectively. I even tried dropping the latter opacity hex without the space, but it would seem that the space makes no difference. :(

    Yes, the # works for me in front of the RGB Color...
  • Spire_Jeff wrote: »
    Did you try:
    send_command dvSchedulerPort[nTpIndex],"'^BMF-',itoa(ClimateTempMode),',0,%TAuto%CT#FF6AFBFF'";
    

    Jeff
    Thanks Jeff, that does it! Darn you AMX and your literal string commands; that is pretty sloppy of them to not mention this at all in PI, or even assume as such in the case of a string of hex... Anyway, that's done. :)
Sign In or Register to comment.