Nick T
Nick T

Reputation: 26767

How do I throw up Windows tray notifications?

I'm trying to use tray notifications in my Python script. I don't care about portability, so I'd be fine with using ctypes and some of the pywin32 modules, but I don't know what calls to use.

My script would be running in the background the whole while, and just alerts the user when they may want to take a possible action. Clicking the balloon should fire off some event I can catch and do something with.

(Is 'Notification' what it's actually called? I get a nice article on MSDN about when to use Notifications, but nothing about how to use them.)

Upvotes: 0

Views: 1634

Answers (1)

David Heffernan
David Heffernan

Reputation: 613572

The Windows function that drives these notifications is Shell_NotifyIcon().

You should find an example of how to use it from Python in the Lib\site-packages\win32\demos\win32gui_menu.py.

Upvotes: 6

Related Questions