Python Forum

Full Version: Checkbox itens with a button to run action
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there, I'm a noob on development but I do have some notion, so please be patient and bear with me.

I'm trying to learn python on my own and I came up with a small challenge for me to see if I can understand how it works and how everything is connected.
I want to make an executable where I have several checkboxes for the user to choose from and after he chooses what he wants then you have a button to execute all tasks that were checked.

I know how to create the checkboxes and the button.
So I'm a bit lost on which command I can use for the checkboxes to add that task to the button and then when the button is pressed is going to run only those that were checked.
I'll give an example:
I want to add tasks for Powershell, so each check box would be a specific command that has to be added to the button if the user check the box and then the button when pressed would have to open powershell and run all the commands that the person chose.

Thank you!
What have you tried so far? You can certainly check the variables to see if one is on or off.
I can check on and off but I don't really want to just check if something was marked, that is not the purpose.
example: I've tried using sys.system to open up powershell with my button and it didn't work, then I've tried os.startfile and also didn't work
And for the checkboxes I still don't know which action I should use so that my button can inherit the option that was checked to add that task at the end.
Problem solved guys, it took a good time but I was able to figure it out how to do it! Thanks