Skip to content
This repository was archived by the owner on Dec 10, 2023. It is now read-only.
RedDeadDepresso edited this page Nov 9, 2023 · 1 revision

Here's a brief overview of how it works:

  1. It loads the config.json file into a variable called config_data and creates a copy of it with all values set to None, storing them in a variable called widgets.
  2. Customtkinter widgets are defined with a command that calls the save_to_json function, and as they are created, they are added to the widgets variable.
  3. It loads config_data into widgets by accessing the same key in both dictionaries and setting the customtkinter widget to the respective value in config_data.
  4. It saves user input by doing the reverse of the previous step: extracting the value from the customtkinter widget, changing the respective value in config_data, and then saving config.json.

As for displaying script output, it uses a specific widget called CTkTextbox stored in a variable called self.log_textbox. You can define tags to set the color of the text. When you click the start button in the sidebar, it runs script.py as a separate process and starts another thread to analyze its standard output. If it finds specific words using a dictionary called self.log_level_colors (associating words with tags), it will display the line with the specified color; otherwise, it will ignore it.

Clone this wiki locally