Skip to content

Latest commit

 

History

History

put_component

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Put Components

You can put a text box in the GUI.

text_box

{
    "gui": {
        "window_name": "Title here!",
        "command": "echo %-%",
        "button": "Hello!",
        "components": [
            {
                "type": "text",
                "label": "Type 'Hello!'"
            }
        ]
    }
}

Components

components is an array of GUI components (e.g., file pickers).
Each component should be defined as a dictionary.

  • type is the component type. text is for a text box.
  • label is the string written above the text box.

You can see more examples for other component types.

Command

Inputs of components will be injected into the value of command when executing the command.
You can specify where they should be injected with %*%.
In the example, the value of the text box will be injected at %-%.

IDs

You can also use the id option to name the components like variables.

"gui": {
    "label": "Text Box Sample",
    "window_name": "Title here!",
    "command": "echo %foo%, %foo%",
    "button": "Hello!",
    "components": [
        {
            "type": "text",
            "label": "Type 'Hello!'",
            "id": "foo"
        }
    ]
}