First, my code:
when = tk.Tk()
when.title("when (sec)")
when.geometry('250x120')
def WhenInput():
print(when.get(1.0, "end"))
when = tk.Text(when, height = 10, width = 10)
when.pack()
when.mainloop()
StartIn = WhenInput
ClickDelay = 0.05
ClickRepeat = 20
mouse = Controller()
time.sleep(StartIn)
def repeat():
mouse.press(Button.left)
time.sleep(ClickDelay)
mouse.release(Button.left)
for i in range(ClickRepeat):
repeat()
What I want it to do is to open a text box, I insert a number for example 5, I close the window and the 5 gets put into the "StartIn" variable.
What I want my code to do when it’s ready: It opens 3 text boxes, one after another where I first input the when, then the how fast and then how much. It’s an autoclicker.
If you want you can suggest better solutions.