Jump to content

How to create a button in a dialog box for launch a script?


---
 Share

Recommended Posts

Hello,

Is it possible, and how to do it if possible, to make a button for let the user choose if launch a script and then run it? Thank you in advance!

Link to comment
Share on other sites

hello

 

You can use the library Tkinter were you create a box with a button and if the user chose ok the script start if not the script fail

Or you can use a script dialog like this one 

RESULT=gom.script.sys.execute_user_defined_dialog (dialog={
    "content": [
        [
            {
                "columns": 1,
                "data": "AAAAAA==",
                "file_name": "",
                "height": 0,
                "keep_aspect": True,
                "keep_original_size": True,
                "name": "image",
                "rows": 1,
                "system_image": "system_message_warning",
                "tooltip": {
                    "id": "",
                    "text": "",
                    "translatable": True
                },
                "type": "image",
                "use_system_image": True,
                "width": 0
            },
            {
                "columns": 1,
                "default_font_family": "",
                "default_font_size": 0,
                "name": "text",
                "rows": 1,
                "text": {
                    "id": "",
                    "text": "<html><p>Execute Script?</p></html>

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...