Popular Post genius257 Posted September 22 Popular Post Posted September 22 (edited) So maybe i just haven't been looking hard enough, but i could not find how to make toast notifications in win8+ from AutoIt. I looked at it on and off, and finally made some progress. Github repository: https://github.com/genius257/au3toast Zip download: https://github.com/genius257/au3toast/archive/refs/tags/1.0.0.zip Enjoy! Edited 8 hours ago by genius257 Danyfirex, ioa747, wakillon and 4 others 5 2 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
WildByDesign Posted September 22 Posted September 22 (edited) Oh this is nice. How did you get them to persist like that? EDIT: I've only spent about 10 minutes playing around with this, but I love it. AutoIt has really needed this because there hasn't been a solution yet for Windows 11 that has been able to have the toasts persist in the notification center like this. Fantastic work. I look forward to watching this progress over time. I definitely can make great use of this. Edited September 22 by WildByDesign genius257 1
genius257 Posted September 22 Author Posted September 22 20 minutes ago, WildByDesign said: Oh this is nice. How did you get them to persist like that? Thank you My guess is the combination of attributes used, but haven't spend much time on the XML, after i got it somewhat usable 22 minutes ago, WildByDesign said: EDIT: I've only spent about 10 minutes playing around with this, but I love it. AutoIt has really needed this because there hasn't been a solution yet for Windows 11 that has been able to have the toasts persist in the notification center like this. Glad to hear! Yeah in general AutoIt has been missing proper native toasts since the windows 8 overhaul, as far as i know 24 minutes ago, WildByDesign said: Fantastic work. I look forward to watching this progress over time. I definitely can make great use of this. Yeah it's a little rough around the edges currently, but i am working towards providing a good implementation little by little Happy to hear it will be used WildByDesign 1 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
wakillon Posted September 23 Posted September 23 Nice work, Thanks 😉 genius257 1 AutoIt 3.3.18.0 X86 - SciTE 4.4.6 - WIN 11 24H2 X64 - Other Examples Scripts
Gianni Posted September 26 Posted September 26 Hi @genius257, Very cool, I'm not familiar with this stuff, but it looks interesting. You've done a great job implementing it in AutoIt! I tried creating some simple test toasts in XML, but not all the tags work correctly at the moment (for example, the <image> tag doesn't display the image if the "src=" parameter is a URL...). Furthermore, it's mandatory to specify the activationType="background" parameter in the initial <toast...> tag... To generate my test toasts in XML, I installed this app (which also has ready-made templates): https://apps.microsoft.com/detail/9nblggh5xsl1 then, to insert the generated XML code into your example listing in AutoIt, I copy the generated code to the clipboard (select the listing and press Ctrl-C), and immediately run this little script (F5 in SciTE), which adapts it and puts it back in the clipboard. I then paste it into the AutoIt listing. Local $sVarName = "$sToast" Local $aStr = StringSplit(ClipGet(), @CRLF, 1) ; get the clipboard content Local $sListing ; = "Func " & $sFuntionName & "()" & @CRLF $sListing &= 'Local ' & $sVarName & ' = ""' & @CRLF For $i = 1 To $aStr[0] $sListing &= $sVarName & ' &= "' & StringReplace($aStr[$i], '"', '""') & '" ' & @CRLF Next ClipPut($sListing) ConsoleWrite($sListing) This is an example of output (which I later modified a bit) to insert into the example script. Local $sToast = "" $sToast &= "<toast activationType=""background"" launch=""action=viewAlarm&alarmId=3"" scenario=""alarm"">" $sToast &= "" $sToast &= " <visual>" $sToast &= " <binding template=""ToastGeneric"">" $sToast &= " <text>Time to wake up!</text>" $sToast &= " <text>To prove you're awake, select which of the following fruits is yellow...</text>" $sToast &= ' <image placement="appLogoOverride" src="file://' & @TempDir & '\e21cd29c9fb51c3a5b82f009ec33fc997d2edd1ece931e8568f37e205c445778.jpeg" hint-crop="circle"/>' $sToast &= " </binding>" $sToast &= " </visual>" $sToast &= "" $sToast &= " <actions>" $sToast &= "" $sToast &= " <input id=""answer"" type=""selection"" defaultInput=""wrongDefault"">" $sToast &= " <selection id=""wrong"" content=""Orange""/>" $sToast &= " <selection id=""wrongDefault"" content=""Blueberry""/>" $sToast &= " <selection id=""right"" content=""Banana""/>" $sToast &= " <selection id=""wrong"" content=""Avacado""/>" $sToast &= " <selection id=""wrong"" content=""Cherry""/>" $sToast &= " </input>" $sToast &= "" $sToast &= " <action" $sToast &= " activationType=""system""" $sToast &= " arguments=""snooze""" $sToast &= " content=""""/>" $sToast &= "" $sToast &= " <action" $sToast &= " activationType=""background""" $sToast &= " arguments=""dismiss""" $sToast &= " content=""Dismiss""/>" $sToast &= "" $sToast &= " </actions>" $sToast &= ' <audio src=''ms-winsoundevent:Notification.Looping.Alarm'' loop=''false''/>' $sToast &= "</toast>" .. I hope you can implement support for events too... Bye and thanks! P.S. There was a notification "emulator" at this link:: Notifications UDF - Desktop notifications 1.2 (updated Mai 1st) - AutoIt Example Scripts - AutoIt Forums ioa747, WildByDesign, genius257 and 1 other 4 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Popular Post genius257 Posted yesterday at 05:04 AM Author Popular Post Posted yesterday at 05:04 AM V1.0.0 released! 🎊 Event on toast interaction now works! 🎉 SOLVE-SMART, WildByDesign, argumentum and 2 others 5 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
WildByDesign Posted yesterday at 11:54 AM Posted yesterday at 11:54 AM 6 hours ago, genius257 said: Event on toast interaction now works! 🎉 I was able to test this new event functionality this morning and it works great. Excellent job! Without a doubt, this is the most fully featured toast notification UDF for AutoIt specifically for utilizing native toast functionality. There are some other UDFs which create their own toast-like notifications. But using built-in Windows functionality is generally the best way to go. Your UDF already does everything that I personally would ever need as far as toast notifications go. One of the best toast notification apps that I've ever used on Windows 11 is actually from KDE, of all things. Snoretoast (https://github.com/KDE/snoretoast). But I didn't like the idea of having to drop yet another binary on disk for my users. So I will likely switch those apps over to your UDF and keep it all AutoIt. By the way, you can always browse their source code (C++) to see if there is anything that they do that might be beneficial for your UDF. I don't understand some of the more complex parts of toast notification functionality, so I'm not even sure if they have anything extra or not. Cheers (or toast!) 🍷 genius257 and SOLVE-SMART 1 1
genius257 Posted 14 hours ago Author Posted 14 hours ago (edited) Hi @Gianni, Sorry for the late reply. First of all thank you for the nice words . On 9/26/2025 at 11:33 PM, Gianni said: the <image> tag doesn't display the image if the "src=" parameter is a URL... Yes i noticed that, that's why my demo downloads an image instead. I'm not currently sure why it does not work. 🤷♂️ I seem to remember some documentation mentioning requirements like maximum response time and file size, but i cannot find that currently. On 9/26/2025 at 11:33 PM, Gianni said: it's mandatory to specify the activationType="background" parameter in the initial <toast...> tag... It seems to be the case, when the app is not registered with the system. After adding the registry and registering the COM objects, activationType foreground also works. Again, not sure why, currently. On 9/26/2025 at 11:33 PM, Gianni said: I installed this app (which also has ready-made templates): https://apps.microsoft.com/detail/9nblggh5xsl1 This is a very cool tool for crafting toast UI, thanks Edit: I can see the tool might be available as open source on GitHub, so maybe I'll make an AutoIt version at some point, for fun On 9/26/2025 at 11:33 PM, Gianni said: P.S. There was a notification "emulator" at this link:: Notifications UDF - Desktop notifications 1.2 (updated Mai 1st) - AutoIt Example Scripts - AutoIt Forums Ah, thank you Edited 14 hours ago by genius257 WildByDesign 1 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
genius257 Posted 14 hours ago Author Posted 14 hours ago (edited) Hi @WildByDesign, Thank you for the feedback and nice words I'm glad to hear it will be put to good use Thanks for the information about KDE/snoretoast, i will differently look at the codebase later, and see if there is anything I'm missing Edit: And thank you for the star on GitHub Edited 14 hours ago by genius257 WildByDesign 1 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now