Python Forum
Checkbox itens with a button to run action
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checkbox itens with a button to run action
#1
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!
Reply
#2
What have you tried so far? You can certainly check the variables to see if one is on or off.
buran likes this post
Reply
#3
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.
Reply
#4
Problem solved guys, it took a good time but I was able to figure it out how to do it! Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pixel color and action Sartre 4 2,114 Apr-13-2023, 03:26 AM
Last Post: Sartre
Question Running an action only between certain times alexbca 9 1,736 Mar-15-2023, 04:21 PM
Last Post: deanhystad
Question Running an action only if time condition is met alexbca 5 1,322 Oct-27-2022, 02:15 PM
Last Post: alexbca
  Checkbox half working Milfredo 12 4,233 Sep-19-2020, 10:43 PM
Last Post: Milfredo
  Use String contents for checkbox name jcday 1 1,633 Dec-06-2019, 06:01 PM
Last Post: Larz60+
  Have an amount of time to perform and action CookieGamez2018 1 2,957 Dec-21-2018, 07:12 AM
Last Post: Gribouillis
  action on MQTT while long loop is running runboy 4 6,112 Oct-05-2018, 11:57 PM
Last Post: runboy
  Hourly action resetter with threading? alex36540 3 3,349 Jan-10-2018, 07:13 AM
Last Post: Gribouillis
  recursive action elhetch 6 5,302 Jun-06-2017, 04:23 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020