-
Notifications
You must be signed in to change notification settings - Fork 0
/
shortcuts.ahk
171 lines (141 loc) · 3.2 KB
/
shortcuts.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
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
168
169
170
171
/*
- shortcuts to applications and workflows
- key combo: Ctrl + Windows + [Key]
*/
; use OpenApp for built-in PATH-aware Windows applications
OpenApp(Name, Parameter := "") {
If !Parameter {
Run, %Name%.exe
} Else {
Run, %Name%.exe %Parameter%
}
}
; use OpenScoopApp for Scoop-installed applications
OpenScoopApp(Name, Parameter := "") {
StartMenuPath = %UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps
If !Parameter {
Run, %StartMenuPath%\%Name%.lnk
} Else {
Run, %StartMenuPath%\%Name%.lnk %Parameter%
}
}
; use OpenStoreApp for Microsoft Store-installed applications
OpenStoreApp(Name) {
ClipboardBackup := Clipboard
KeyWait, Ctrl
Send, {LWin}
Sleep, 250
Clipboard = %Name%
Send, ^v
Sleep, 250
Send, {Enter}
Clipboard = %ClipboardBackup%
}
/*
** letter keys **
*/
; description: Bitwarden
^#B::
OpenStoreApp("Bitwarden")
Return
; description: Calculator
^#C::
OpenApp("calc")
Return
; description: context key
^#PrintScreen::
Send, {AppsKey}
Return
; description: Excel
^#E::
OpenApp("EXCEL")
Return
; description: FileZilla
^#F::
OpenScoopApp("FileZilla")
Return
; description: GIMP
^#G::
OpenScoopApp("GIMP")
Return
; description: music (Google Play Music Desktop Player)
^#M::
Run, C:\Users\dustin\AppData\Local\GPMDP_3\app-4.5.0\Google Play Music Desktop Player.exe
Return
; description: Notepad
^#N::
OpenApp("notepad")
Return
; description: open dev workflow (MAMP, Cmder, VS Code)
^#O::
FileSelectFolder, SelectedFolder, D:\, 3, Select a project folder to open.
; if the FileSelectFolder dialog is dismissed, end the function
If ErrorLevel
Return
; the second parameter of MsgBox is Options; 68 is its summed value
; 4 = MsgBox with "Yes" and "No" buttons
; 64 = MsgBox with an "i" (info) icon
MsgBox, 68, Open MAMP?, If this is a WordPress site, select "Yes" to open MAMP.
IfMsgBox Yes
Run, C:\MAMP\MAMP.exe
; open the project folder in Cmder and Visual Studio Code
OpenScoopApp("Cmder", "/start " SelectedFolder)
OpenScoopApp("Visual Studio Code", SelectedFolder)
Return
; description: Paint
^#P::
OpenApp("mspaint")
Return
; description: reload main.ahk
; - refreshes all scripts\*ahk files
^#R::
Run, %A_ScriptDir%\main.ahk
Return
; description: Snipping Tool
^#S::
OpenApp("SnippingTool")
Return
; description: Trello
^#T::
OpenStoreApp("Trello")
Return
; description: Visual Studio Code
^#V::
OpenScoopApp("Visual Studio Code")
Return
; description: Word
^#W::
OpenApp("WINWORD")
Return
/*
** function keys **
*/
; description: Chrome
^#F1::
OpenScoopApp("Google Chrome")
Return
; description: Chrome (incognito)
^#F2::
OpenScoopApp("Google Chrome", "--incognito")
Return
; description: Firefox
^#F3::
OpenScoopApp("Mozilla Firefox")
Return
; description: Firefox (private)
^#F4::
OpenScoopApp("Mozilla Firefox", "-private-window")
Return
; description: Internet Explorer
^#F5::
OpenApp("iexplore")
Return
; description: Internet Explorer (private)
^#F6::
OpenApp("iexplore", "-private")
Return
; description: Cmder
^#F7::
OpenScoopApp("Cmder")
Return
; cSpell:words FileZilla, GPMDP, iexplore, MAMP, mspaint, Trello, WINWORD