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


Calling dialog windows from macros has been available since PUMOTIX 3.5.0. Earlier versions do not support this functionality.

Dialog boxes allow the user to send values ​​to the macro from the program interface (before that there were several parameters that can be sent using a G-code string).

The function of calling a dialog window is implemented through the ShowDialogSimple() command. It is designed to call a window that has a text description and several fields for entering a value.

An example of calling the  ShowDialogSimple() function:

local res,out1,out2 = ShowDialogSimple("Enter parameters:","","")

The result of this command is shown in the screenshot.

A general function template:

local Bool result, String out1, String out2,...,String outn = ShowDialogSimple(String label, String in1,...,String inn);

Bool resulta variable that takes on the value true if the "OK" button was clicked and false if the "Cancel" button was clicked.
String out1, String out2,..., String outnthe values of the fields that were filled in in the dialog window.
String labela string with a description that will appear in the called window.
String in1,..., String innstrings with values that will be filled fields by default. Count of fields that will be displayed in the dialog window depends on the number of values among the function arguments in1, in2, .., inn.

The function can also output simple yes/no queries. To do this, it is enough to add one parameter which will be displayed as text and request the result into a variable. Example:

local res = ShowDialogSimple("An error has occurred. Complete the task anyway?")
  • No labels