当我们看某人不爽时,可以用这个:
import tkinter as tk
import random
import threading
import time
def dow():
window = tk.Tk()
window.title('你是SB')
window.geometry("200x50" + "+" + str(random.randrange(0, window.winfo_screenwidth())) + "+" + str(random.randrange(0, window.winfo_screenheight())))
tk.Label(window,
text='你是个SB!', # 标签的文字
bg='Green', # 背景颜色
font=('楷体', 20), # 字体和字体大小
width=20, height=4 # 标签长宽
).pack() # 固定窗口位置
window.mainloop()
threads = []
for i in range(100): # 需要的弹框数量
t = threading.Thread(target=dow)
threads.append(t)
time.sleep(0.00000000000000000000000001)#间隔时间
threads[i].start()
'''
这里许多变量都可以自定义,看你喜好
'''