#NoTrayIcon
Opt("TrayMenuMode",1) ; 默认托盘菜单项目(脚本已暂停/退出脚本) (Script Paused/Exit) 将不显示.
$prefsitem = TrayCreateItem("参数")
TrayCreateItem("")
$aboutitem = TrayCreateItem("关于")
TrayCreateItem("")
$exititem = TrayCreateItem("退出")
TraySetState()
While 1
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $prefsitem
Msgbox(64, "参数:", "系统版本:" & @OSVersion)
Case $msg = $aboutitem
Msgbox(64, "关于:", "AutoIt3-托盘-例子.")
Case $msg = $exititem
quit();ExitLoop
EndSelect
WEnd
;Exit
Func quit()
$passwd = InputBox("安全性检查", "输入你的密码.", "", "*")
If $passwd="abcde" Then
MsgBox(0,0,"密码输入正确")
Exit
EndIf
EndFunc
|