-
StackOverflow 文档
-
AutoHotkey 教程
-
使用函数而不是标签
-
带功能的托盘菜单操作
#Persistent
Menu, Tray, NoStandard ; remove default tray menu entries
Menu, Tray, Add, MyDefaultAction, OnDefaultTrayAction ; add a new tray menu entry
Menu, Tray, Add, Exit, Exit ; add another tray menu entry
Menu, Tray, Default, MyDefaultAction ;When doubleclicking the tray icon, run the tray menu entry called "MyDefaultAction".
OnDefaultTrayAction() {
MsgBox, You double clicked the tray icon of this script or you clicked the MyDefaultAction entry!
}
Exit() {
MsgBox, You clicked the Exit entry! The script will close itself now.
ExitApp
}