-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathhub16-example.ahk
More file actions
167 lines (132 loc) · 3.59 KB
/
hub16-example.ahk
File metadata and controls
167 lines (132 loc) · 3.59 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#NoEnv
#InstallKeybdHook
#UseHook On
#SingleInstance force ;only one instance of this script may run at a time
#MaxHotkeysPerInterval 2000
SetTitleMatchMode, 2 ; Partial title string matching
;Hub16
;------------------ ENC1:Clockwise: q
;| ENC1 ENC2 | ENC1:Anticlockwise: r
;| a b c d | ENC1:Button: s
;| e f g h | ENC2:Clockwise: t
;| i j k l | ENC2:Anticlockwise: u
;| m n o p | ENC2:Button: v
;------------------
; Remember to uncomment lines before using them, and restart the script each time!
#if (getKeyState("F24", "P"))
F24::return
;------------------------------------------------------------------------------
; Row 0 / Encoders
;------------------------------------------------------------------------------
;q::{}
;r::{}
;s::{}
;t::{}
;u::{}
;v::{}
;------------------------------------------------------------------------------
; Row 1
;------------------------------------------------------------------------------
;a::{}
;b::{}
;c::{}
;d::{}
;------------------------------------------------------------------------------
; Row 2
;------------------------------------------------------------------------------
e::
{ ; Update URL, keeping ID number
Send {control down}{l}{control up} ; Get URL Bar
Sleep, 50
Send {right} ; End of URL
Sleep, 50
Send {control down}{left}{control up} ; Move left of number
Send {control down}{shift down}{home}{shift up}{control up} ; Select URL other than ID
Send www.url-before-number.com/number= ; Update with URL
Send {enter}
return
}
f::
{
Send ¯\\\_(ツ)_/¯
return
}
g::
{
Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe https://website.com
return
}
h::
{ ; Login into application
if WinActive("application name"){
Send area {enter}
Sleep, 1500
Send team {enter}
Sleep, 1500
Send username {tab}{tab}
}
; Activate application
if WinExist("application name")
WinActivate
else if WinExist("launcher name")
WinActivate
else
Run, C:\ProgramData\Microsoft\Windows\path-to-application
return
}
;------------------------------------------------------------------------------
; Row 3
;------------------------------------------------------------------------------
;i::{}
;j::{}
k::
{
Run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe https://another-website.com
return
}
l::
{
; If Excel Active, open sceen
if WinActive("ahk_exe EXCEL.EXE")
Send {control down}{o}{control up}
; If Excel not active, activate excel
else if WinExist("ahk_exe EXCEL.EXE")
WinActivate
else
Run, EXCEL.EXE
return
}
;------------------------------------------------------------------------------
; Row 4
;------------------------------------------------------------------------------
m::
{ ; Replace text to fix website 404
Send {control down}{l}{control up}
Send {right}
Send {control down}{left}{left}{left}{left}{left}{control up}
Send {control down}{shift down}{right}{control up}{shift up}
Send new-text/
Send {enter}
return
}
;n::{}
o::
{ ; Pull Webex Teams to front / open if closed
if WinActive("Webex Teams")
return
else if WinExist("Webex Teams")
WinActivate
return
}
p::
{
; If outlook Active, new email
if WinActive("ahk_exe OUTLOOK.EXE")
Send {control down}{n}{control up}
; If Outlook not active, activate outlook
else if WinExist("ahk_exe OUTLOOK.EXE")
WinActivate
else
Run, OUTLOOK.EXE
return
}