Repository navigation
Expand file tree
/
Copy pathtestscript.ahk
More file actions
120 lines (105 loc) · 2.33 KB
/
Copy pathtestscript.ahk
File metadata and controls
120 lines (105 loc) · 2.33 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
#SPACE:: Winset, Alwaysontop, , A
return
#Insert::
run C:\Users\Lion\AppData\Local\Programs\Python\Python37\python.exe D:\labs\hexomancer-sioyek\sioyek\deploy.py
return
GetSelectedText(){
prevclipboard = %Clipboard%
Clipboard=
Send, ^c
ClipWait, 1
selected = %Clipboard%
Clipboard = %prevclipboard%
return selected
}
#IfWinActive ahk_class Notepad
#f::
Send, {Alt down}{Alt up}fa^l
path := GetSelectedText()
Send, !{f4}
run wt lf "%path%"
return
#IfWinActive ahk_class CabinetWClass
#f::
prevclip = %Clipboard%
Clipboard=
Send, +{AppsKey}a
ClipWait, 0.25
if %ErrorLevel% {
Send, {Esc}^lwt lf{Enter}
return
} else {
pth = %Clipboard%
Clipboard = prevclip
run wt lf "%pth%"
return
}
return
#IfWinActive ahk_exe vlc.exe
#f::
Send, ^l{Tab}{AppsKey}{Down}{Down}{Down}{Down}{Enter}
Sleep, 0.5
Send, +{Tab 2}
pth := GetSelectedText()
Send, !{f4}
Sleep, 0.25
Send, ^l
run wt lf "%pth%"
return
#IfWinActive ahk_exe chrome.exe
#f::
Send, ^j
Sleep, 500
Send, {Click 770 290}
Sleep, 500
Clipboard=
Send, +{AppsKey}a
ClipWait, 1
if %ErrorLevel% {
run wt lf
return
} else{
pth = %Clipboard%
Send, !{f4}
Sleep, 500
Send, ^w
run wt lf %pth%
return
}
#IfWinActive ahk_exe IDMan.exe
#f::
Send, {AppsKey}{Up}{Enter}
pth := GetSelectedText()
Send, !{f4}!{f4}
run wt lf "%pth%"
return
#IfWinActive ahk_exe nvim-qt.exe
#f::
percent := Chr(37)
Send, :{!} wt lf %percent%{Enter}
return
#IfWinActive ahk_exe Code.exe
#f::
Clipboard=
Send, ^+pCopy path of active file{Enter}
ClipWait, 1
run wt lf "%Clipboard%"
return
#IfWinActive ahk_exe devenv.exe
#f::
Clipboard=
Send, ^!c ; requires to bind control+alt+c to File.CopyFullPath in Visual Studio
ClipWait, 1
run wt lf "%Clipboard%"
return
#IfWinActive ahk_exe sioyek.exe
#f::
Clipboard=
Send, ^+o^a^c{Esc} ; requires to bind control+alt+c to File.CopyFullPath in Visual Studio
ClipWait, 1
run wt lf "%Clipboard%"
return
#IfWinActive
#f::
run wt lf
return