-1
Hello, I come to ask for the help of someone more experienced in this matter than myself. I’m trying to use Tkinter and Pyautogui to automate a dull task of my everyday life. My goal is to create a looping, it needs to run without the Tkinter window in the first loop, from the second on, open the window, because the button I put has to "de-pause" the looping and continue repeating until I stop the programming. I’ve tried using for in range, but to no avail..
from tkinter import *
import pyautogui
import time
from time import sleep
def sd():
time.sleep(3)
pyautogui.click(69, 90, duration= 1)
time.sleep(4.5)
pyautogui.click(116, 86, duration= 1)
time.sleep(12)
pyautogui.click(394, 88, duration= 1)
pyautogui.click(101, 575, duration= 1)
pyautogui.click(153, 419, duration= 1)
pyautogui.click(213, 578, duration= 1)
pyautogui.click(714, 571, duration= 1)
janela = Tk()
bt = Button(janela, width=20, text="Próximo CTE", command=sd)
bt.place(x=50, y=50)
janela.geometry("250x100+200+200")
janela.mainloop()
Thanks buddy. it worked perfectly !
– Gabriel Zago