generated from Nigh/ahk-autoupdate-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
tray.ahk
36 lines (35 loc) · 716 Bytes
/
tray.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
gotoWebpage_maker(page)
{
webpage(*){
Run(page)
}
return webpage
}
setTray()
{
global version, trueExit, customTrayMenu
trayExit(*){
trueExit("","")
}
Reloads(*){
Reload
}
tray := A_TrayMenu
tray.delete
tray.add("v" . version, (*)=>{})
tray.add()
if(customTrayMenu.HasOwnProp("valid") && customTrayMenu.HasOwnProp("menu")) {
For , Value in customTrayMenu.menu
{
tray.add(Value.name, Value.func)
tray.Default := Value.name
}
tray.add()
}
tray.add("Github 页面", gotoWebpage_maker("https://github.com/Nigh/ahko"))
tray.add("Donate 捐助", gotoWebpage_maker("https://ko-fi.com/xianii"))
tray.add("Reload 刷新", Reloads)
tray.add("Exit", trayExit)
tray.ClickCount := 1
}