Finding ip for IF statement Thread last updated on 2005-09-08 12:11:50

Posted by member 193429 on 2005-09-08 09:35:12

I'm try to make my desktop stats display a text string if not connected to a network, rather than just telling me an ip address of 127.0.0.1. Something along the lines of:

IF {ip test}
IPLabelText "IP ADDRESS : [ip]"
ELSE
IPLabelText "IP ADDRESS : Not Connected"
ENDIF

How would I test this in an if statement?

Posted by member 32550 on 2005-09-08 12:11:50 link

If you use xLabel, there are "Conditional Text Escape Sequences", which can do this!
There's a whole page about it in the ReadMe:
Basically you need something like this:
IPLabelText "[if(connected)]IP ADDRESS : [ip][else]IP ADDRESS : Not Connected[endif]

IF statements in the RC files are always static (they are only processed upon Start/!recycle).