I want to use pystray
module in python to create a system tray app on Windows. Until now I managed to write this:
import pystray
from PIL import Image
image = Image.open("image.gif")
icon = pystray.Icon(name ="SPAM!", icon =image, title ="MOBASuite", menu =None)
icon.run()
I had a hard time to find out how this works. Its not clearly explained in a documentation.
How can I create a menu after rightclicking on the icon and how can I add items to the menu and set default one, which should be called if I click on the icon with left button. And how can I update the icon? If I run the this program, 3 icons are created and Imust hover mouse over them to become one icon. Same thing when I close the program.