I am trying to make a version of Butterflies on Desktop in python. I am trying to use a transparent window that displays the animation of a butterfly. But I am Encountering an issue, I cannot figure out how to make this window move on the screen. I have tried using:
root.geometry("200x200+100+100")
But this only moves the window when starting the script, and does not move it after the window has been created.
Does anyone know how I can reliably move the window? I does not have to be smooth, or an animation. I have been researching for a while now, and nothing works.
Main Code:
from tkinter import *
import tkinter as tk
from random import randint
root=Tk()
def main():
root.geometry(("200x200+"+(randint(10,100))+"+"+(randint(10,100))))
root.after(2000,main())
root.mainloop()
P.S. I have looked at the stackoverflow question called "how to move the entire window to a place on the screen", but it only tells me how to move it originally. Not during the loop. (I am on macOSX)