Helper functions for evoware command handlers.
- Source:
Methods
-
<static> createExecuteLine(path, args, wait, exitCodeVariableName)
-
Create the Evoware token to execute an external command.
Parameters:
Name Type Description path
string path to command to execute
args
array array of arguments to pass
wait
boolean true if evoware should wait for the command to complete execution
exitCodeVariableName
string optional name of
- Source:
Returns:
a string representing an Evoware 'Execute' token.
- Type
- string
-
<static> createFactsLine(equipment, variableName, value)
-
Create an Evoware FACTS token.
Parameters:
Name Type Description equipment
string equipment ID for the FACTS command
variableName
string variable name for the FACTS command
value
string optional value of the variable
- Source:
Returns:
a string representing an Evoware 'FACTS' token.
- Type
- string
-
<static> createIfLine(variable, test, value, target)
-
Create an 'If' token.
Parameters:
Name Type Description variable
string name of the variable to test
test
string one of "==", "!=", "<", ">"
value
string | number value to compare to
target
string target to jump to: an Evoware "Comment" token
- Source:
Returns:
- line for an "If" token
- Type
- string
-
<static> createStartScriptLine(path)
-
Create the Evoware 'StartScript' token.
Parameters:
Name Type Description path
string path to the script to start
- Source:
Returns:
- line for a "StartScript" token
- Type
- string
-
<static> createUserPromptLine(text, beep, autoclose)
-
Create the Evoware token to prompt the user.
Parameters:
Name Type Description text
string text to show the user
beep
numeric 0: none, 1: beep once, 2: beep three times, 3: beep every 3 seconds
autoclose
numeric number of second to leave the prompt open before autoclosing it and continuing operation (-1 means no autoclose)
- Source:
-
<static> createVariableLine(text, beep, autoclose)
-
Create the Evoware token to prompt the user.
Parameters:
Name Type Description text
string text to show the user
beep
numeric 0: none, 1: beep once, 2: beep three times, 3: beep every 3 seconds
autoclose
numeric number of second to leave the prompt open before autoclosing it and continuing operation (-1 means no autoclose)
- Source:
-
<static> quote(s)
-
Put double-quotes around a string, if it doesn't already have them.
Parameters:
Name Type Description s
string any input string
- Source:
Returns:
string with outer double-quotes.
- Type
- string
-
<static> stripQuotes(s)
-
If a string is surrounded by double-quotes, remove them.
Parameters:
Name Type Description s
string a string, possible with outer double-quotes.
- Source:
Returns:
string with outer double-quotes removed.
- Type
- string