Windows-10-Toast-Notifications
Windows-10-Toast-Notifications copied to clipboard
Keep notification after excecution
is there a way that when the program executes to keep the notification in the system tray rather than having it disappear? thank you.
+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?
It would be a nice feature. I'd like to see the notification on the notification history.
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))
Also need this. Would be really useful.