Notify Class v2: AutoHotkey Toast Popups with Buttons and Sounds

MsgBox works. But it stops your script cold and makes someone click OK.

A lot of the time you just want a quick heads-up that shows, then gets out of the way.

How about you? How many of your scripts finish silently, and you never know if they worked?

Notify Class v2 is our AutoHotkey v2 library for toast-style notifications. It’s what we use in our own tools. 😊

Notify Class v2 toast notifications in AutoHotkey v2

Video: the Notify class for AutoHotkey v2
Watch it in action on YouTube

One Line Shows a Toast


Include the library, then call Notify.Show(“Done!”). That’s it.

Want more control? Pass an object instead and set only the options you care about. Everything else falls back to the defaults.

Set the duration to 0 and the toast stays on screen until it’s clicked.

Sounds, Icons, Links and Buttons


Here’s what you can change on each toast:

  • Text: font, size and color for the header and the body, plus the background color
  • Icons: a Shell32 icon number, your own image or icon file, or names like Information and Question
  • Sounds: Windows sounds by name, any .wav file you point it to, or the 11 sounds in the res folder
  • Clicks: a callback function, a hyperlink, or colored buttons that each run their own function
Sharing your screen? Set GenHideFromCapture and the toast stays visible to you but hidden from screen capture and recordings.

Calling it from another program or a batch file? Notify also takes command-line parameters, like -BDText “Backup done”.

Nine Screen Positions, Any Monitor


Toasts show in the bottom right by default. Pick any corner, any edge center, the middle of the screen, or right next to the mouse.

Choose which monitor too. Extra toasts stack instead of covering each other.

What’s in the Download


  • NotifyV2.ahk: the library, version 2.8.0
  • Examples folder: 12 example scripts, from a basic toast to buttons and hide-from-capture
  • res folder: sound files and the-Automator icon used by the examples
  • docs folder: a user guide in HTML and PDF
Requirements: Windows and AutoHotkey v2.

Drop NotifyV2.ahk in your lib folder or next to your script, then #Include it.

Get Notify Class v2


Notify Class v2 is $4.99. You get the full source and all the examples.

One thing I’ve learned: a script that tells you what it did gets trusted, and a silent one gets second-guessed.

Give yours a voice. ⚡

Joe

Comments are closed.