Owner's Manual (Complete)

Chapter 11 - Expressions
The Home Control Assistant
7
General use functions
These functions are generally useful and many are similar to Visual Basic functions.
Bool = _IsDate (any)
Returns YES if the argument is a datetime or an expression that evaluates to a dateTime.
Bool = _IsText (any)
Returns YES if the argument is a string or an expression that evaluates to a string.
Bool = _IsBool (any)
Returns YES if the argument is a yes/no value or an expression that evaluates to a Yes/No
value
Bool = _IsNumber (any)
Returns YES if the argument is a number or an expression that evaluates to a number
number = _Max (number, number, …)
Returns the largest number from any of the arguments provided. You can have up to 10
arguments.
number = _Min (number, number, …)
Returns the smallest number from any of the arguments provided. You can have up to 10
arguments.
number = _Abs (number)
Returns the absolute value of the number. That is, always a positive number.
any = _Choose (number, any, any, …)
Returns as its result the Nth argument. The 1
st
argument chooses which argument to be
returned. The
any arguments can be of any types. For example:
Example: _Choose (3, “Jan”, “Feb”, “Mar”, “Apr”, “May”)
Result: “Mar”
any = _iif (bool, any1, any2)
Returns any2 if the 1
st
argument is NO. Otherwise returns any1.
number = _rand (number, number)
Returns a random number chosen between the two numbers supplied.
bool = _PlaySound (string, number)
Plays a Sound file using the computers sound system. The 1
st
argument is a path to the sound
file. The second argument is as follows:
1: The sound file starts playing and HCA moves to the next element
2: The sound file starts playing and HCA moves to the next element. When the sound file
finishes, it starts playing again.
3: The sound file starts playing and HCA waits until it is complete before moving to the next
element
If you used option #2, at a later time you can stop the sound file playing by using the
PlaySound function again with “” for the path.