Messages & Logs commands
comment · log · logtofile · messagebox · prompt
comment Comment
Descriptive comment; has no effect on execution.
Parameters
| Parameter | Value | Default | Description |
|---|---|---|---|
--text required | text |
Examples
comment --text:"This section handles the login process"
log Log
Writes a log entry.
Parameters
| Parameter | Value | Default | Description |
|---|---|---|---|
--message required | text | ||
--level | one of debug, info, warning, error | info |
Examples
log --message:"Processing started" --level:info
log --message:"Value is: $myVar$" --level:debug
logtofile Log to file
Writes a line of text to a file on the agent machine.
Parameters
| Parameter | Value | Default | Description |
|---|---|---|---|
--file required | text | Log file path A file on the agent machine. | |
--text required | text | Text to write (variables allowed) | |
--timestamp | true / false | false | Prefix the line with the current date and time |
--timestampformat | text | yyyy-MM-dd HH:mm:ss | Date/time format for --timestamp |
--append | true / false | true | Add to the end of the file; false overwrites it |
--encoding | text | utf-8 |
messagebox Message box
Displays a message dialog on the agent machine.
Parameters
| Parameter | Value | Default | Description |
|---|---|---|---|
--title | text | Message Box | |
--message required | text | ||
--buttons | one of ok, yesno, okcancel, yesnocancel | ok | |
--autoclose | number | Close automatically after this many seconds; the answer is then "timeout" | |
--output | variable name | Variable that receives the result |
Examples
messagebox --title:"Confirmation" --message:"Continue processing?" --buttons:yesno --output:userChoice
prompt Prompt
Asks the person at the agent machine for a value: text, a password, a number, one of a list of choices, or a file or folder. Cancelling the dialog fails the command (handle it with try/catch).
Parameters
| Parameter | Value | Default | Description |
|---|---|---|---|
--title | text | Botream | |
--message required | text | The question shown above the input | |
--type | one of text, password, number, choice, file, folder | text | password is hidden while typed and masked in logs; file and folder offer a Browse button |
--options | any value | The choices of --type:choice: a list variable or comma-separated values | |
--default | any value | Value filled in when the dialog opens | |
--output required | variable name | Variable that receives the result |
Examples
prompt --title:"Order" --message:"Which order number?" --output:orderNo
prompt --message:"Unit?" --type:choice --options:"kg, lt, pcs" --default:kg --output:unit
prompt --message:"Report file" --type:file --output:reportPath