-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStartAHK.ahk
90 lines (76 loc) · 2.65 KB
/
StartAHK.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
;; A collection of useful keyboard shortcuts that use on a daily basis.
;; :org: ITESM QRO
;; :author: Luis Montoya
;; :mail: [email protected]
; Pull requests are welcome!
; To install AHK (takes less than 15 seconds)
; https://www.autohotkey.com/
; To auto start on Windows 10:
; 1. https://www.maketecheasier.com/schedule-autohotkey-startup-windows/
; Useful things to have
#InstallKeybdHook
SetNumLockState, AlwaysOn ; Will not allow to turn NumLock Off
; Google that for me
LAlt & g::
clipboard = ; Empty clipboard
Send ^c ; Copy whatever is selected
ClipWait, 0
if ErrorLevel{ ; If empty just open Google
Run, http://www.google.com/
Send {CtrlDown}l{CtrlUp} ; Select navigation bar
return
}else{
Run, http://www.google.com/search?q=%clipboard% ; Google whatever is on clipboard
}
return
; Sci Hub that for me
LAlt & s::
clipboard = ; Empty clipboard
Send ^c ; Copy whatever is selected
ClipWait, 0
if ErrorLevel{ ; If empty just open Google
; Do nothing
return
}else{
Run, https://sci-hub.tw/%clipboard% ; Open Sci Hub
return
}
return
; YouTube that for me
LAlt & y::
clipboard = ; Empty clipboard
Send ^c ; Copy whatever is selected
ClipWait, 0
if ErrorLevel{ ; If empty just open Google
; Do nothing
return
}else{
TestString := clipboard
; Replace all spaces with pluses:
StringReplace, tmp, TestString, %A_Space%, +, All
Run, https://www.youtube.com/results?search_query=%tmp%
return
}
return
; ToDo Focus
; Requires link creation: https://stackoverflow.com/questions/35125286/how-to-start-windows-store-apps-in-autohotkey
LAlt & t::
Run, C:\WinStoreAppLinks\ToDo.lnk
return
; --------------- Number Pad shortcuts ---------------
; Maps that for me
Rcontrol & Numpad0::
clipboard = ; Empty the clipboard
Send ^c
ClipWait, 0
if ErrorLevel{ ; If empty just open Google Maps (It has QRO coordinatees, but it defaults to Texas :( )
Run, https://www.google.com/maps/@20.5618375,-100.3729132,14z
return
}else{
Run, https://www.google.com/maps/search/%clipboard%/@20.6122818,-100.4059563 ; Search whatever was at clipboard on maps
}
return
; Calculator that for me
Rcontrol & NumpadEnter::
Run, calc.exe
return