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 pathstring path to command to execute
argsarray array of arguments to pass
waitboolean true if evoware should wait for the command to complete execution
exitCodeVariableNamestring 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 equipmentstring equipment ID for the FACTS command
variableNamestring variable name for the FACTS command
valuestring 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 variablestring name of the variable to test
teststring one of "==", "!=", "<", ">"
valuestring | number value to compare to
targetstring 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 pathstring 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 textstring text to show the user
beepnumeric 0: none, 1: beep once, 2: beep three times, 3: beep every 3 seconds
autoclosenumeric 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 textstring text to show the user
beepnumeric 0: none, 1: beep once, 2: beep three times, 3: beep every 3 seconds
autoclosenumeric 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 sstring 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 sstring a string, possible with outer double-quotes.
- Source:
Returns:
string with outer double-quotes removed.
- Type
- string