I'm not that great at python just getting snippets from here and there.
Right now I have user input, button click that runs the user's input and that is working for individual single inputs.
I am trying to make a user input with multiple answers Example "1, 2, 5, 7, 23" -> To infinity amount
When submitted I need those answers to run in a loop until they are all used up.
So 5 answers would run the loop 5 times, each time using a different number from the user input.
By "each time using a different number" I mean I will be running a modbus coil command and those integers will be the coil address. Thus turning on or off those coils via the running loop.
So something like..
usernumbers = self.txtinput.get_text()
usernumbers.split()
usernumbersamount = len(usernumbers.split()
while usernumbers <= useramount:
modbus command goes here
Thats about as far as I can get of it will even work, Maybe it needs to be in an array for it to work?
sorry if user input looks funny this will be ran in a browser
Thanks!!