Notify()[Download Notify.ahk v0.4993 or Demo]

Create multiple simultaneous auto-positioning tray area notifications very simply. Use Notify() in any number of scripts and they will stack accordingly. Notifications are customizable in color and style, duration, and can call subroutines when clicked or timeout. Display information quickly and easily for debugging or end-user interfaces.

Notify( [ Title, Message, Duration, Options ] )

Standard Library [stdlib] compliant, drop in your Lib folder and call Notify() to use.



Title text of notification.

Title and Message can contain `n to show multiple lines.
Title is bold by default, change this with Options.


Message text of notification.


Number of seconds to show notification. [Default: 30 seconds]
Use a 0 duration for duration until clicked (infinite)
Use a negative duration to force an ExitApp after duration or click.
Use "-0" (in quotes) to force an ExitApp after click, but last indefinitely


Options string to set the style of this and following notifications.
See below for details. Example:

"TS=16 TM=8 TF=Times New Roman GC_=Blue SI_=1000"

Also can include actions Wait and Update:

"Wait=" NotifyID

Option String

Option Default            Description          
GC FFFFAA ; Gui Color GR 9 ; Gui Radius GT Off ; Gui Transparency TS 12 ; Title Font Size TW 625 ; Title Font Weight TC Black ; Title Font Color TF Arial ; Title Font Face MS 12 ; Message Font Size MW 550 ; Message Font Weight MC Black ; Message Font Color MF Arial ; Message Font Face BC 000000 ; Border Colors BW 2 ; Border Width/Thickness BR 13 ; Border Radius BT 105 ; Border Transpacency BF 300 ; Border Flash Speed BK Silver ; Border Flash Color SI 0 ; Speed In (AnimateWindow) SC 0 ; Speed Clicked (AnimateWindow) ST 0 ; Speed TimeOut (AnimateWindow) IW 32 ; Image Width IH 32 ; Image Height Image ; Image File (limitation: can't use "=" in file name) IN 0 ; Image Icon Number (from shell32.dll if no Image File used) PG 100 ; Progress Bar initialize/set max value PC Default ; Progress bar color PB Default ; Progress bar background color PW 200 ; Progress bar width PH Default ; Progress bar height XF Arial Black ; X-Button Font Face XC Default ; X-Button Color XS 12 ; X-Button Font Size XW 800 ; X-Button Font Weight AC, AT, AX ; Actions Clicked/Timeout/X-Close respectively (label to run) GF 50 ; First gui number to use GL 74 ; Last number to define range Wait [v0.495+] ; set to Notify ID (returned value) to wait for Update [v0.4981+] ; set to Notify ID (returned value) to update Title, Message, Image, or Progress of Return ; special call to obtain static values

Return Value

If the Notify() is created successfully, the return value is the ID/Gui Number used

If the function fails or there are too many Notify()'s open, 0 is returned


Notify()                            ;= all parameters are optional
Notify("Title","Message")           ;= simple common usage
Title = This is the title

Notify("T","M",5)                   ;= lasts 5 seconds
Notify("T","M",-5)                  ;= ExitApp when clicked or 5 seconds

NotifyID := Notify("T","M",0)       ;= lasts until clicked
  Sleep, 5000
Notify("","", 0,"Wait=" NotifyID)   ;= kills an open notification, or
Notify("","",-5,"Wait=" NotifyID)   ;= waits 5 seconds before killing
Notify("","", 5,"Wait=" NotifyID)   ;= waits 5 seconds or until clicked/timeouts before proceding without killing