-
Notifications
You must be signed in to change notification settings - Fork 22
/
TeamsyLauncher.ahk
48 lines (33 loc) · 1.04 KB
/
TeamsyLauncher.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
37
38
39
40
41
42
43
44
45
46
47
48
; See documentation https://tdalon.github.io/ahk/Teamsy-Launcher
LastCompiled = 20231026154346
#Include <Teamsy>
#SingleInstance force ; for running from editor
HKid = Launcher
RegRead, HK, HKEY_CURRENT_USER\Software\PowerTools, TeamsHotkey%HKid%
If (HK != "") {
MenuLabel = &Run Launcher`t(%HK%)
} Else
MenuLabel = &Run Launcher
Menu, Tray, Add, %MenuLabel%, Teams_Launcher
SubMenuSettings := PowerTools_MenuTray()
Menu,Tray,Default,%MenuLabel%
If (HK != "") {
Teams_HotkeyActivate(HKid,HK, False)
MenuLabel = %HKid% Hotkey`t(%HK%)
} Else
MenuLabel = %HKid% Hotkey
Menu, SubMenuSettings, Add, %MenuLabel%, Teams_HotkeySet
; Tooltip
If !a_iscompiled
FileGetTime, LastMod , %A_ScriptFullPath%
Else
LastMod := LastCompiled
FormatTime LastMod, %LastMod% D1 R
sTooltip = Teamsy Launcher %LastMod%`nRight-Click on icon to access other functionalities.
Menu, Tray, Tip, %sTooltip%
; Reset Main WinId at startup because of some possible hwnd collision
PowerTools_RegWrite("TeamsMainWinId","")
return
Teams_Launcher:
Teamsy("-g")
return