Author Topic: HOW TO show N/A instead of 999 for prior weather temperatures  (Read 1869 times)

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2852
    • View Profile
    • Codecore Technologies
The Weather Channel driver shows temperatures and humidities that are no longer pertinent for the time of day as 999. You will likely want to display something more informational than 999. You could for example show "N/A" or you might just not show anything.

You can use a Boolean control to display anything you like when the value is 999 as follows:

1. Add a Boolean control to your interface.
2. Edit the control's properties.
3. Select the Boolean pane, select the 2nd radio button to evaluate a script and enter the following line as the script:
weather.Highs[0] == 999
4. Select the True Text pane and enter the text you would like to show when the above expression is true, ie when the 1st Highs value is 999 such as:
N/A
5. Select the False Text pane and enter the text you would like to show when the above expression is false, it when the 1st Highs value is not 999. In this case you will likely want to use a macro to show the actual value such as:
{weather.Highs[0]}

That's it unless you want to change the font, etc.

If you want to add more controls for the other date values then you just need to change the index from 0 to 1,2,3,etc...


This article was taken from a discussion in this thread.
John Hughes
Codecore Technologies