jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
970 stars 168 forks source link

Duration = Until user manually closes toast #40

Open JDogg1329 opened 5 years ago

JDogg1329 commented 5 years ago

Is this possible? I've tried duration = 0 but that seems to close it after a little while anyway (I'm using threaded notifications if that makes a difference)

Basically I want "high priority" toasts to stack and stay around until the user manually acknowledges them

umutinevi commented 5 years ago

duration = None

Tobio89 commented 4 years ago

I tried duration = None and whilst a notification appeared, I also got an error saying duration must be int and not NoneType.

Tobio89 commented 4 years ago

I tried this: In the file .\win10toast__init__.py", line 112 if duration: sleep(duration) DestroyWindow(self.hwnd) UnregisterClass(self.wc.lpszClassName, None) return None

If you add the line if duration: and indent everything, then it works. Edit: don't know why I can't have the code on multiple lines...