-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmenus.ahk
88 lines (67 loc) · 2.64 KB
/
menus.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
AUTOEXEC_menus_ahk: ; Workaround for Autohotkey's ugly auto-exec feature. Must be first line.
; Create the popup menu by adding some items to it.
Menu, MyMenu, Add, WinTV Toggle Mute(ctrl+m), WinTVToggleMute
Menu, MyMenu, Add, ¡ïWinTV Toggle Start/Stop Recording (alt+r), WinTVToggleRecording
Menu, MyMenu, Add ; Add a separator line.
Menu, MyMenu, Add, Aver PVR Toggle Mute (F8), AverPvrToggleMute
Menu, MyMenu, Add, ¡ïAver PVR Start Recording (ctrl+r), AverStartRecording
Menu, MyMenu, Add, ¡îAver PVR Stop Recording (ctrl+s), AverStopRecording
;Menu, MyMenu, Add ; Add a separator line.
;Menu, MyMenu, Add, UPMOST PVR Toggle Mute (m), UpmostPvrToggleMute
;Menu, MyMenu, Add, ¡ïUPMOST PVR Start Recording, UpmostStartRecording
;Menu, MyMenu, Add, ¡îUPMOST PVR Stop Recording, UpmostStopRecording
Menu, MyMenu, Add ; Add a separator line.
; Create another menu destined to become a submenu of the above menu.
Menu, Submenu1, Add, Item1, MenuHandler
Menu, Submenu1, Add, Item2, MenuHandler
; Create a submenu in the first menu (a right-arrow indicator). When the user selects it, the second menu is displayed.
Menu, MyMenu, Add, My Submenu, :Submenu1
Menu, MyMenu, Add ; Add a separator line below the submenu.
Menu, MyMenu, Add, Item3, MenuHandler ; Add another menu item beneath the submenu.
return ; End of auto-execute section.
MenuHandler:
MsgBox You selected %A_ThisMenuItem% from the menu %A_ThisMenu%.
return
WinTVToggleMute:
SetTitleMatchMode, RegEx
ControlSend, , ^m, ^WinTV7$
SetTitleMatchMode, 3 ; restore to default exact match
return
WinTVToggleRecording:
SetTitleMatchMode, RegEx
ControlSend, , !r, ^WinTV7$
SetTitleMatchMode, 3 ; restore to default exact match
return
;======================
AverPvrToggleMute:
SetTitleMatchMode, RegEx
ControlSend, , {F8}, ^AVer MediaCenter$
SetTitleMatchMode, 3 ; restore to default exact match
return
AverStartRecording:
SetTitleMatchMode, RegEx
ControlSend, , ^r, ^AVer MediaCenter$
SetTitleMatchMode, 3 ; restore to default exact match
return
AverStopRecording:
SetTitleMatchMode, RegEx
ControlSend, , ^s, ^AVer MediaCenter$
SetTitleMatchMode, 3 ; restore to default exact match
return
;======================
UpmostPvrToggleMute:
SetTitleMatchMode, RegEx
ControlSend, , m, ^UPMOST PVR$
SetTitleMatchMode, 3 ; restore to default exact match
return
UpmostStartRecording:
SetTitleMatchMode, RegEx
ControlSend, , ^r, ^UPMOST PVR$
SetTitleMatchMode, 3 ; restore to default exact match
return
UpmostStopRecording:
SetTitleMatchMode, RegEx
ControlSend, , {ESC}, ^UPMOST PVR$
SetTitleMatchMode, 3 ; restore to default exact match
return
#z::Menu, MyMenu, Show ; i.e. press the Win-Z hotkey to show the menu.