# Operator Interface

{% embed url="<https://www.youtube.com/watch?t=3s&v=MynsO7VOQ9U>" %}

## <mark style="color:blue;">#msg (Show a message)</mark>

Show formatted message on operator interface

<figure><img src="/files/FoM2bFCqXEwBPyAnmyOw" alt=""><figcaption></figcaption></figure>

### Examples

{% tabs %}
{% tab title="Example 1 " %}

<table data-full-width="true"><thead><tr><th width="93">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#msg</td><td>"Simple message to show..."</td></tr></tbody></table>

Display a simple tiny message with text specified above.<br>

<figure><img src="/files/qoORdazZk1RfCJCpGEoo" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 2 " %}

<table data-full-width="true"><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#msg</td><td><p>"Message to show...";size=medium;tsize=40;image="c:\\path\\to\</p><p>\image1.jpg";color=light-red</p></td></tr></tbody></table>

Display medium-sized message with a light-red colored text and image specified by path and text below of image. Set the text-size to 40pt (default is 24).<br>

<figure><img src="/files/YWJFHIUNeogze1YBG9cU" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 3" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#msg</td><td>size=large;image="c:\path\to\image2.png";bg=black</td></tr></tbody></table>

Display a full-screen image only with black background.<br>

<figure><img src="/files/D5eMSfbb4WacOowyRVyF" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 4" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#msg</td><td><p>"Text left of the image";size=medium;tpos=left;image="c:\\path\\to\</p><p>\image2.png"</p></td></tr></tbody></table>

Display a medium-sized message with text aligned to left side.<br>

<figure><img src="/files/a5eDw3pOgImeuyuHHCj8" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 5" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#msg</td><td>size=large;image="plugin://Remote"</td></tr></tbody></table>

Display a full-screen image and allow the plug-in with alias "Remote" to send the image directly to operator's interface.
{% endtab %}
{% endtabs %}

### Return Value

No return value

### Command Overview

<table data-full-width="true"><thead><tr><th width="136">Command<select><option value="69d37e59dbc44aaca6dc72161f84784b" label="#msg" color="blue"></option><option value="b928d283a7784fae8c94f7bc27467b23" label="#dlg" color="blue"></option></select></th><th>Parameter</th></tr></thead><tbody><tr><td><span data-option="69d37e59dbc44aaca6dc72161f84784b">#msg</span></td><td>{&#x3C;text>}{;type=[enum|string]}{;size=[enum]}{;image=[string]} {;color=[color]}{;bg=[color]}{;tsize=[int]}{;tpos=[enum]}</td></tr></tbody></table>

#### Parameter Description

<table data-full-width="true"><thead><tr><th width="177.33333333333331">Parameter</th><th width="185">Type</th><th>Options</th></tr></thead><tbody><tr><td>text</td><td>[string]</td><td>Text to display. If test-file localization is loaded, the text is automatically translated.</td></tr><tr><td>type</td><td>[enum | string]</td><td><p>Message type and text position if both displayed<br>• auto - determine the type based on 'text' and 'image' arguments ('text' only = type text, 'image' only = type image, both 'text' and 'image' = both)</p><p>-or-</p><p>• im or image - show image</p><p>• t or text - show text in default position</p><p>• tt - show text on the top</p><p>• tb - show text on the bottom</p><p>• tl - show text on the left side </p><p>• tr - show text on the right side</p><p> </p><p>Type as a combination of 1-2 type string above, using plus '+' character, i.e.:</p><p>"im" (image only), "im+t" (image and text), "im+tt" (image and text on top)</p><p> </p><p><strong>Default</strong>: auto</p></td></tr><tr><td>size</td><td>[enum]</td><td><p>Message size (area of operator screen):</p><p>• tiny - small box for 1-2 lines of text</p><p>• medium - medium-sized box, about one-half of the operator screen</p><p>• large - full-screen message on operator screen (excluding top and right-side menus)</p><p> </p><p><strong>Default</strong>: tiny</p></td></tr><tr><td>image</td><td>[string]</td><td><p>Image to display.</p><p>Required when type is specified to display an image. Supported image formats: JPEG, PNG, GIF, and BMP</p><p> </p><p>• path to file on a hard drive (i.e. "c:\path\to\image.png") • device plug-ins from version 2.0: "plugin://&#x3C;device- alias>"</p><p> </p><p>When image source is set to plug-in, the plug-in can render a custom image to the operator's screen independently.<br></p><p><strong>Default</strong>: (none)</p></td></tr><tr><td>color</td><td>[color]</td><td>Color of message text<br><strong>Default</strong>: black</td></tr><tr><td>bg</td><td>[color]</td><td>Color of message text<br><strong>Default</strong>: white</td></tr><tr><td>tsize</td><td>[int]</td><td>Text size in points<br><strong>Default:</strong> 24</td></tr><tr><td>tpos</td><td>[enum]</td><td><p>To specify the position of the text when 'type' argument is not used or set to 'auto' and both image and text are displayed.</p><p>Valid positions:</p><p>• top (above the image) <br>• bottom (below the image) </p><p>• left</p><p>• right</p><p> </p><p>If the 'type' argument is specified, this argument is ignored<br><strong>Default: bottom</strong></p></td></tr></tbody></table>

{% hint style="info" %}
Use `#msg | push`&#x20;

to save last shown message (including all parameters) to memory. This commands requires any previously shown message. The memory is shared across all threads - the message can be stored in one thread and restored in another thread.&#x20;

\
Use  `#msg | pop`&#x20;

to restore last saved message from the memory. This commands requires previously saved message using push. Calling this command will not delete the saved message, so it's possible to call it repeatedly.
{% endhint %}

## <mark style="color:blue;">#dlg (Show a dialog)</mark>

Show an overlay dialog with formatted message on operator screen. This function blocks executing the program until one of dialog button is pressed or item is selected.

<figure><img src="/files/ve5fvqdmcFuLPhBz6Sw1" alt=""><figcaption></figcaption></figure>

### Examples

{% tabs %}
{% tab title="Example 1 " %}

<table><thead><tr><th width="161">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#dlg</td><td>"Simple dialog to confirm..."</td></tr></tbody></table>

Show a simple confirmation dialog with one button - "OK". Return value will be always "@ok".<br>

<figure><img src="/files/WkkuYgwNj0UTtMAgpya3" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 2 " %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#dlg</td><td>"Select an item";w=100;h=100;items="one,two,three,four,five"</td></tr></tbody></table>

Show a full-screen dialog (width and height is 100%) to select one of predefined items. Return value will be one of the items.<br>

<figure><img src="/files/DFMaHorB9FJ6RM9n53HE" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 3" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#dlg</td><td>"Enter your name:";w=70;h=50;edit=true</td></tr></tbody></table>

Show a dialog with an edit-box. Return value will be the entered text.<br>

<figure><img src="/files/8F8y3S61Vkb61PdYT98d" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Example 4" %}

<table data-full-width="true"><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#dlg</td><td>"IO paired dialog";buttons="ok,cancel";iomap="start,stop"</td></tr></tbody></table>

Show a dialog with two buttons and map OK button to "start" IO alias and Cancel button to "stop" alias<br>

<figure><img src="/files/j9GK7eb7srnpHCFrdKw8" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Return Value

If no items are passed to the dialog and no edit-box is shown, the return value is the name of button pressed with a "@" character at first place ("@ok", "@cancel", "@retry", etc..). Otherwise, the return value is the selected item or user-entered text.

### Command Overview

<table data-full-width="true"><thead><tr><th width="154">Command<select><option value="69d37e59dbc44aaca6dc72161f84784b" label="#msg" color="blue"></option><option value="b928d283a7784fae8c94f7bc27467b23" label="#dlg" color="blue"></option></select></th><th>Parameter</th></tr></thead><tbody><tr><td><span data-option="b928d283a7784fae8c94f7bc27467b23">#dlg</span></td><td>{;type=[enum|string]}{;w=[number]}{;h=[number]}{;image=[string]} {;color=[color]}{;bg=[color]}{;tsize=[number]}{;items=[list]} {;edit=[bool]}{;input-text=[string]}{;input-mask=[bool]}{;buttons=[list]} {;tpos=[enum]}{;iomap=[list]}</td></tr></tbody></table>

#### Parameter Description

<table data-full-width="true"><thead><tr><th width="133.33333333333331">Parameter</th><th width="108">Type</th><th>Options</th></tr></thead><tbody><tr><td>text</td><td>[string]</td><td>Text to display. If test-file localization is loaded, the text is automatically translated.</td></tr><tr><td>type</td><td>[enum | string]</td><td><p>Message type and text position if both displayed<br>• auto - determine the type based on 'text' and 'image' arguments ('text' only = type text, 'image' only = type image, both 'text' and 'image' = both)</p><p>-or-</p><p>• im or image - show image</p><p>• t or text - show text in default position</p><p>• tt - show text on the top</p><p>• tb - show text on the bottom</p><p>• tl - show text on the left side </p><p>• tr - show text on the right side</p><p> </p><p>Type as a combination of 1-2 type string above, using plus '+' character, i.e.:</p><p>"im" (image only), "im+t" (image and text), "im+tt" (image and text on top)</p><p> </p><p><strong>Default</strong>: auto</p></td></tr><tr><td>w</td><td>[number]</td><td><p>Dialog width, percent of operator screen. <br>Range: 20 - 100</p><p><strong>Default</strong>: 80</p></td></tr><tr><td>h</td><td>[number]</td><td><p>Dialog height, percent of operator screen. <br>Range: 20 - 100</p><p><strong>Default</strong>: 80</p></td></tr><tr><td>image</td><td>[string]</td><td><p>Image to display.</p><p>Required when type is specified to display an image. Supported image formats: JPEG, PNG, GIF, and BMP</p><p> </p><p>• path to file on a hard drive (i.e. "c:\path\to\image.png") • device plug-ins from version 2.0: "plugin://&#x3C;device- alias>"</p><p> </p><p>When image source is set to plug-in, the plug-in can render a custom image to the operator's screen independently.<br></p><p><strong>Default</strong>: (none)</p></td></tr><tr><td>color</td><td>[color]</td><td>Color of message text<br><strong>Default</strong>: black</td></tr><tr><td>bg</td><td>[color]</td><td>Color of message text<br><strong>Default</strong>: white</td></tr><tr><td>tsize</td><td>[int]</td><td>Text size in points<br><strong>Default:</strong> 24</td></tr><tr><td>tpos</td><td>[enum]</td><td><p>To specify the position of the text when 'type' argument is not used or set to 'auto' and both image and text are displayed.</p><p>Valid positions:</p><p>• top (above the image) <br>• bottom (below the image) </p><p>• left</p><p>• right</p><p> </p><p>If the 'type' argument is specified, this argument is ignored<br><strong>Default:</strong> bottom</p></td></tr><tr><td>items</td><td>[list]</td><td>A comma-separated list of text items. One of them can be selected in the dialog.<br>When no buttons, text and image is passed, the result is the dialog with only the list of items to select. <br><strong>Default</strong>: (none)</td></tr><tr><td>edit</td><td>[bool]</td><td><p>If true, the edit-box is shown on the dialog. </p><p><strong>Default</strong>: false</p></td></tr><tr><td>input-text</td><td>[string]</td><td>The default text to be prepared in the edit-box.</td></tr><tr><td>input-mask</td><td>[bool]</td><td>Mask the text by a standard system password character. <strong>Default</strong>: false</td></tr><tr><td>buttons</td><td>[list]</td><td>A comma-separated list of buttons to show. <br>Possible values are: <br><em><code>• ok</code></em> <br><em><code>• cancel</code></em> <br><em><code>• yes</code></em> <br><em><code>• no</code></em> <br><em><code>• retry</code></em> <br>If edit box is shown or item values to select are passed, the "ok" button should be shown, because it confirms the typed text. <br><strong>Default</strong>: ok (if no items and iomap are passed, otherwise no button is shown)</td></tr><tr><td>iomap</td><td>[list]</td><td><p>Mapping buttons to specified IO (inputs only) aliases from test station's <code>IO mapping system.</code> <br>Comma-separated list in following possible formats:<br>• Inputs aliases only: <code>inbutton(0),inbutton(1),...,inbutton(N)</code> (buttons to pair depends equals to order in the buttons argument) <br>-or- <br>• Specified button(s) to specified alias(es): <code>io0>button0,in1</code></p><p><code>button1,...,inN>buttonN</code> (buttons are paired to inputs directly) </p><p>-or-</p><p>• Combination of both formats: <code>inbutton(0),inbutton(1),io2 button2,...,inN>buttonN</code> (first two buttons are paired by buttons argument position and others are directly paired) <strong>Default</strong>: (none)</p></td></tr></tbody></table>

## <mark style="color:blue;">#status (Set test status of current panel)</mark>

Control status label of current or specified panel(s).

<figure><img src="/files/xdBizGOKQSbJaNZkU5lW" alt=""><figcaption></figcaption></figure>

### Examples

{% tabs %}
{% tab title="Example 1 " %}

<table data-full-width="true"><thead><tr><th width="161">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#status</td><td>@pass</td></tr></tbody></table>

Set status of current panel to "passed".
{% endtab %}

{% tab title="Example 2 " %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#status</td><td>@ready:panel=*</td></tr></tbody></table>

Set "ready" status for all panels.
{% endtab %}

{% tab title="Example 3" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#status</td><td>@test:panel=1,3,4</td></tr></tbody></table>

Set "test" status for selected panels.
{% endtab %}

{% tab title="Example 4" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#status</td><td>"Processing...":color=light-blue</td></tr></tbody></table>

Set custom status text of current panel to "Processing..." with light blue background color.
{% endtab %}

{% tab title="Example 5" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#status</td><td>panel=4:color=blue</td></tr></tbody></table>

Set panel's 4 color to blue, without any text.
{% endtab %}
{% endtabs %}

### Return Value

No return value

### Command Overview

<table data-full-width="true"><thead><tr><th width="136">Command<select><option value="69d37e59dbc44aaca6dc72161f84784b" label="#msg" color="blue"></option><option value="b928d283a7784fae8c94f7bc27467b23" label="#dlg" color="blue"></option><option value="1d710c03d13e44a9925de899a7785994" label="#status" color="blue"></option></select></th><th>Parameter</th></tr></thead><tbody><tr><td><span data-option="1d710c03d13e44a9925de899a7785994">#status</span></td><td>{}{:panel=[list]}{:color=[color]}</td></tr></tbody></table>

#### Parameter Description

<table data-full-width="true"><thead><tr><th width="133.33333333333331">Parameter</th><th width="115">Type</th><th>Options</th></tr></thead><tbody><tr><td>status</td><td>[string]</td><td><p>custom text of the current panel or one of the predefined values below: <br>• <code>@ready</code> - Ready/In queue </p><p>• <code>@pass</code> - Test passed </p><p>• <code>@fail</code> - Test failed </p><p>• <code>@test</code> - Testing in progress </p><p><strong>Default</strong>: no text</p></td></tr><tr><td>panel</td><td>[list]</td><td>Specify panel(s) to change status label at once. Format: comma separated panel numbers or asterisk (*) to select all existing panels. <br><strong>Default</strong>: current panel</td></tr><tr><td>color</td><td>[color]</td><td>Background color of specified panel when the custom text is used. The "@ready/pass/fail/test" will have always fixed colors (gray/green/red/yellow). <br><strong>Default</strong>: light-yellow</td></tr></tbody></table>

{% hint style="info" %}
The panel configuration needs to be defined using #panel command or defined in the Head File

![](/files/QJKMWVkRnBxMTCgLwgdi)\
The panel configuration 3x1 means 3 panels in one row as shown in the screenshot above
{% endhint %}

## <mark style="color:blue;">#resultlist (Result list operations)</mark>

Control how test results are displayed in the result list

<figure><img src="/files/FyHBCLcTsqR6PiDboVdT" alt=""><figcaption></figcaption></figure>

### Examples

{% tabs %}
{% tab title="Example 1 " %}

<table data-full-width="true"><thead><tr><th width="161">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#resultlist</td><td>clear{:panel=[int]}</td></tr></tbody></table>

Clear all results or if panel parameter specified, clear selected panel's results only.
{% endtab %}

{% tab title="Example 2 " %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#resultlist</td><td>showerrors &#x3C;or>  showall</td></tr></tbody></table>

Show only error results or all results.
{% endtab %}

{% tab title="Example 3" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#resultlist</td><td>panel:&#x3C;#panel></td></tr></tbody></table>

This command allows to set current panel number. Valid numbers must be defined in the test-program.
{% endtab %}

{% tab title="Example 4" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#resultlist</td><td>reqconfirm</td></tr></tbody></table>

Shows a confirm button on the testing screen. This function blocks the executing of program until user confirms results.
{% endtab %}

{% tab title="Example 5" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#resultlist</td><td>sort:FailsOnTop</td></tr></tbody></table>

Sorts current view of result-list. The sorting is not done on-the-fly and must be called manually. Sorting cannot be reverted, once it's done the previous order cannot be restored.
{% endtab %}
{% endtabs %}

### Return Value

No return value

## <mark style="color:blue;">#userbtn (User button control)</mark>

This command enables to add/modify/remove the user button(s) on operator's interface sidebar. Click the button performs the asynchronous function call to the specified label.

<figure><img src="/files/OlZieO56L8nOfY8l4lcr" alt=""><figcaption></figcaption></figure>

### Return Value

No return value.

### Command Overview

<table data-full-width="true"><thead><tr><th width="154">Command<select><option value="69d37e59dbc44aaca6dc72161f84784b" label="#msg" color="blue"></option><option value="b928d283a7784fae8c94f7bc27467b23" label="#dlg" color="blue"></option><option value="b5ffd5e22520417d86396e4f52dbd8f7" label="#userbtn" color="blue"></option></select></th><th>Parameter</th></tr></thead><tbody><tr><td><span data-option="b5ffd5e22520417d86396e4f52dbd8f7">#userbtn</span></td><td>add:&#x3C;id>;call=[string]{;param=[string]}{;caption=[string]} {;enabled=[bool]}{;image=[path]}</td></tr><tr><td><span data-option="b5ffd5e22520417d86396e4f52dbd8f7">#userbtn</span></td><td>set:&#x3C;id>{;param=[string]}{;caption=[string]} {;enabled=[bool]}{;image=[path]}</td></tr><tr><td><span data-option="b5ffd5e22520417d86396e4f52dbd8f7">#userbtn</span></td><td>remove:&#x3C;id></td></tr></tbody></table>

#### Parameter Description

<table data-full-width="true"><thead><tr><th width="133.33333333333331">Parameter</th><th width="115">Type</th><th>Options</th></tr></thead><tbody><tr><td>id</td><td>[string]</td><td>The unique ID(s) of the button(s). ID is used to identificate the button in another functions. An asterisk (*) used like an ID identificates all existing buttons - this cannot be used when adding buttons.</td></tr><tr><td>call</td><td>[string]</td><td>Target label of the function which will be asynchronously called by clicking the specified button.</td></tr><tr><td>param</td><td>[string]</td><td>Optional parameter to pass to the target function. If exists, the value will be written in to the "Return Value" column on the line, where the function label is declared.</td></tr><tr><td>caption</td><td>[string]</td><td>Caption of the button. This parameter is not required, but recommended.</td></tr><tr><td>enabled</td><td>[bool]</td><td>If true, the button is disabled, if false the button is disabled. <br><strong>Default</strong>: false</td></tr><tr><td>image</td><td>[path]</td><td>Picture of the button. This parameter is not required, but recommended. Source picture can be in the PNG/JPEG/BMP/ GIF format, highly-recommended is the PNG format with the resolution of 64x64 pixels.</td></tr></tbody></table>

{% hint style="info" %}
Once the function is called, it is not possible to call it again until it finishes, otherwise an error message is thrown. It's recommended to disable the button using the set:;enabled=false command immediately after asynchronous function is called and enable the button at the end of the function. The error message is shown also in the case, that the target label does not exist
{% endhint %}

### Examples

{% tabs %}
{% tab title="Example 1 " %}

<table data-full-width="true"><thead><tr><th width="161">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#userbtn</td><td>add:print-label;call=print-label-event;caption="Print label"; image="$project-dir$\print-icon-64.png"</td></tr></tbody></table>

Add a new user-button labeled "Print label". The button is identified by ID "print-label" and click the button calls the "print-label-event" labeled function in the test-file. By default, the operator is not allowed to click the button (is disabled). The "$project-dir$" is a funTEST's internal variable, which will be replaced by the directory of currently active project.
{% endtab %}

{% tab title="Example 2 " %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#userbtn</td><td>set:print-label;enabled=true</td></tr></tbody></table>

Enable the "print-label" button - the operator is allowed to click the button.
{% endtab %}

{% tab title="Example 3" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#userbtn</td><td>set:*;enabled=false</td></tr></tbody></table>

Disable all user-buttons. An asterisk (\*) used like an ID selects all buttons to modify.
{% endtab %}

{% tab title="Example 4" %}

<table><thead><tr><th width="126">Command</th><th>Parameter</th></tr></thead><tbody><tr><td>#userbtn</td><td>remove:*</td></tr></tbody></table>

Remove the all user-buttons from the sidebar
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://funtest-1.gitbook.io/funtest-documentation/creating-test-sequence/funtest-commands/operator-interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
