while 1
Opt("TrayMenuMode",1) ; 默认菜单项目 (脚本暂停/退出) will not be shown.
$1 = TrayCreateItem("")
$aboutitem = TrayCreateItem("关于")
$2 = TrayCreateItem("")
$exititem = TrayCreateItem("退出")
TraySetState()
$begin = 1
While 1
$msg = TrayGetMsg()
$begin = $begin+1
if $begin=1000 then
ExitLoop
EndIf
Select
Case $msg = 0
ContinueLoop
Case $msg = $aboutitem
Msgbox(64,"关于:",$begin)
Case $msg = $exititem
Exit
EndSelect
WEnd
TrayItemDelete($aboutitem)
TrayItemDelete($exititem)
TrayItemDelete($1)
TrayItemDelete($2)
WEND
|