Windows-10-Toast-Notifications icon indicating copy to clipboard operation
Windows-10-Toast-Notifications copied to clipboard

Duration = Until user manually closes toast

Open JDogg1329 opened this issue 6 years ago • 3 comments

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

JDogg1329 avatar Aug 26 '18 11:08 JDogg1329

duration = None

umutinevi avatar Jun 20 '19 18:06 umutinevi

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

Tobio89 avatar Jul 07 '20 00:07 Tobio89

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...

Tobio89 avatar Jul 07 '20 00:07 Tobio89