ph_killmacrowait PowerHome formula function
Description
Deletes
the oldest waiting macro matching the specified ID from the Macro Wait Queue
Syntax
ph_killmacrowait ( )
ph_killmacrowait ( as_macro )
Argument | Description |
as_macro | String (Optional). The ID of the waiting macro
that you would like to have killed. If this parameter is omitted, the
system variable MACRO will be used |
Return value
Integer. Returns a 1 if no macros matching the ID are waiting. Returns 0 otherwise. If more than one macro matching the ID is waiting, this function only kills the oldest waiting macro
Usage
Use this function to kill a macro that
is currently in a wait state. If more than one macro with the same ID is
waiting, this will function will ONLY kill the oldest waiting matching macro ID.
If this function is called from within a macro and the as_macro parameter is
omitted, it will use the value in the system variable MACRO which will be the
same ID as the macro from which this function
was executed
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_killmacrowait("SPRINKLERCYCLE") -
Kills the oldest waiting instance of the macro SPRINKLERCYCLE and returns a 0.
If SPRINKLERCYCLE has no waiting instances, nothing happens and a value of 1 is
returned.
• ph_killmacrowait() - Kills the
oldest waiting instance of a macro with the same ID from which this function was
executed