Notify() [v0.45]

作者: gwarble 最近更新时间: 20100801


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,Image)

参数

Title

Title text of notification.

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

Message

Message text of notification.

Duration

[15] Number of seconds to show notification.
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

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

*** "Wait" to wait for a notification

Image

Number of icon from shell32.dll to use for image.
- or -
Filename of image or resource to use for image.

*** Gui Number to "Wait" for

返回值

Gui Number used ***, 0 if failed (too many open).

备注

I am sorry to say this against what the author says. Thi library is not stdlib conform to me, because it uses labels. Labels are uniqhe through the whole script, like globals.

关于此函数(集)的更新细节和注意事项, 请参见 AutoHotkey 论坛: http://www.autohotkey.com/forum/viewtopic.php?t=48668

许可

不存在

示例

; #Include Notify.ahk
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

Title= Hello
Message= World
Duration=0
Options:="GC=bbffbb TC=White MC=White"
Image=14

Notify(Title,Message,Duration,Options,Image)