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

Keep notification after excecution

Open ghost opened this issue 4 years ago • 4 comments

is there a way that when the program executes to keep the notification in the system tray rather than having it disappear? thank you.

ghost avatar Nov 04 '20 10:11 ghost

+1 for opening up this question. I wanted to know if we can like keep the toast on the screen (to the bottom right of course) and perhaps update the data in there if needed?

pssolanki111 avatar Nov 16 '20 17:11 pssolanki111

It would be a nice feature. I'd like to see the notification on the notification history.

gozeloglu avatar Dec 30 '20 14:12 gozeloglu

I am using this. It works perfectly and can hold notifications in notification/action center until you clear them refer https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-ux-guidance

from winrt.windows.ui.notifications import ToastNotificationManager, ToastNotification
import winrt.windows.data.xml.dom as dom
notifier = ToastNotificationManager.create_toast_notifier(r'C:\Users\HP\AppData\Local\Programs\Python\Python38\python.exe')

tString = """<toast duration='short'><audio src  = 'ms-winsoundevent:Notification.Reminder' loop = 'false' silent = 'false'/><visual><binding template='ToastText02'><text id="1">""" + title + """</text><text id="2">""" + desp + """</text></binding></visual></toast>"""

xDoc = dom.XmlDocument()
xDoc.load_xml(tString)
notifier.show(ToastNotification(xDoc))

maxwill-max avatar Mar 24 '21 21:03 maxwill-max

Also need this. Would be really useful.

gosukiwi avatar Apr 25 '22 15:04 gosukiwi