Page tree
Skip to end of metadata
Go to start of metadata

Command: Assign from File

This command allows to assign values to variables. The values are retrieved from a text file.

Parameters

variable The name of the variable to which a value is assigned.
//
filename The name of a plain text file containing the possible values that should be assigned. Every line must contain exactly one value, starting from the first line. Trailing spaces are ignored. The file must be located in the script directory.
//
strategy The algorithm that is used to choose the next value. Currently random, shuffle and sequential are supported.

(warning)  Keep in mind: The strategy setting is taking full effect on the EEM Robot only. The EEM Editor does not persist state between script executions and therefore uses the first or random value from list for each new execution. If you want to test this command in the editor you can set schedule.iterations to a value greater than 1 (Script Config -> Advanced -> Parameters). Then every time you run the script multiple iterations will be performed. Between these iterations the state will be kept.

HowTo

  • Right click in Editor to insert a message at that point of the EEMon Script where you need to assign a value to a variable.


//

  • Set type "Command" for the message and provide a name
  • Define which variable should be filled
  • Provide a datasource file
  • Select a strategy.

In the example picture the variable "my_variable" will be filled randomly with values from file values.txt

  • No labels