dlg_click_ok()
Triggers the “OK” button click in a dialog.
Syntax
planetcnc.dlg_click_ok(handle)
Parameters
| Parameter | Type | Description | Comment |
| handle | string | Handle of the dialog containing the button. | |
Return Value
`True` if the “OK” button was successfully triggered.
`False` if the button was not found or could not be clicked.
Raises exception on error if the handle is invalid.
Examples
#! /usr/bin/env python
import planetcnc
# Trigger the OK button in a dialog
dialog_handle = "MyDialogHandle"
if planetcnc.dlg_click_ok(dialog_handle):
print("OK button clicked.")
else:
print("OK button not found.")
See also