from tkinter import *
import datetime
root = Tk()
root.geometry("400x400")
root.resizable(0, 0)
root.config(bg="#103030")
root.title("Mostrar Aviso")
titulo = Label(text="Mostrar Aviso",
font=("Arial", "28", "bold"),
bg="#103030", fg="#49e3e3")
titulo.place(relx=0.18, rely=0.05)
mensagem_mostrada = False
def verificar_hora():
global mensagem_mostrada
agora = datetime.datetime.now()
if agora.hour == 10 and agora.minute >= 42 and not mensagem_mostrada:
texto_sub1 = Label(text="Aviso! Ir lanchar",
font=("Arial", "25", "bold"),
bg="#103030", fg="#49e3e3")
texto_sub1.place(relx=0.2, rely=0.45)
mensagem_mostrada = True
root.after(1000, verificar_hora)
verificar_hora()
root.mainloop()