autoit能不能双击右下角的autoit图标后退出
本帖最后由 kn007 于 2009-7-2 14:24 编辑如题,我想双击图标就能退出。。。。 #Include <Constants.au3>
#NoTrayIcon
Opt("TrayMenuMode",1) ; 默认菜单项目 (脚本暂停中/退出)(Script Paused/Exit) 将不会显示.
$settingsitem = TrayCreateMenu("设置")
$displayitem = TrayCreateItem("显示", $settingsitem)
$printeritem = TrayCreateItem("打印", $settingsitem)
TrayCreateItem("")
$aboutitem = TrayCreateItem("关于")
TrayCreateItem("")
$exititem = TrayCreateItem("退出")
TraySetState()
While 1
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg = $aboutitem
Msgbox(64,"关于:","AutoIt3-托盘-例子")
Case $msg = $exititem
ExitLoop
Case $msg = $TRAY_EVENT_PRIMARYDOUBLE
ExitLoop
EndSelect
WEnd
Exit
主要语句是
Case $msg = $TRAY_EVENT_PRIMARYDOUBLE
ExitLoop
谢谢你哦
页:
[1]