dlg_run()

Runs the dialog loop until aborted or terminated.

This function continuously checks if the dialog is active and waits for user interaction.

Syntax

planetcnc.dlg_run(handle, sleep_interval=default)

Parameters

Parameter Type Description Comment
handle string Handle of the dialog to run.
sleep_interval int Time (in milliseconds) between checks. Minimum is 50ms. optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Run an existing dialog with a known handle
dialog_handle = "MyDialogHandle"
 
if planetcnc.dlg_is_valid(dialog_handle):
    while planetcnc.dlg_run(dialog_handle):
        pass
 
print("Dialog terminated.")

See also

dlg_new
dlg_init
dlg_update
dlg_clear

dlg_show
dlg_run
dlg_abort

dlg_is_valid
dlg_keep_open
dlg_callback