Video file path in SD.txt
#NoEnv
#Warn
#SingleInstance, Force
#KeyHistory 10
#IfWinActive ahk_class CabinetWClass
7::I("!4") ;[via][Explorer] Copy Path of the Selected File/Folder(s) ;7::Clipboard:=GFx("c")
;7::I("{Appskey}a") ;[Win 11]
#IfWinActive SD - Notepad
Numpad1::pv("bl")
pv(c="", x=1){
global gv_p
I("{End}") (x ? Clipboard:=GFx(c) : Iw("bl"))
f=
(c join
"%gv_p%\Media Toolz\
;mpv\mpv
;mplayer-38119\mplayer
ffmpeg-2022-04-28-essentials\bin\ffplay
"
;"%gv_p%\Autz\AHK_Express\Lib\MCI Example - Standard Example.ahk"
)
Run % f (x ? " -fs """ : " ""D:\Deux\Downloads\Music\opus\BGM\") Clipboard """"
}
GFx(c="", m="", e="", v=""){ ;[1] x, [2] n, [3] p, [4] d, [5] nx, [D] dpnx
if c in c,bl
Iw(c="c" ? "" : "bl")
else {
ClipB(1)
Clipboard:=c
}
Loop, parse, % RQ(), `n, `r
{
Transform, t, Deref, %A_Loopfield%
dpnx:=RegexReplace(t, ".*(.:[/\\])", "$1")
if !(dpnx~=":[/\\]")
Continue
if e
dpnx:=Rlnk(dpnx)
if m {
SplitPath, dpnx,, p, x, n,d
dpnx:=m=5 ? n "." x : m=4 ? d : m=3 ? p : m=2 ? n : m= ? x
}
v .= dpnx "`n"
}
ClipB(0)
return Trim(v, "`n")
}
Rlnk(f){
SplitPath, f,,, x
clnk:
if x="lnk"
Goto xlnk
Return a
xlnk:
FileGetShortcut, %f%, a
Goto clnk
}
ClipB(x:=""){ ;Default: No Backup, 0 Restore, 1 Backup & Clear Clipboard
global TClipB
if x
TClipB := ClipboardAll
Clipboard := x=0 ? TClipB : ""
}
RQ(x=0){
Return StrReplace(Cx(x), """")
}
Cx(x=0){
Return x ? x : Clipboard
}
Iw(s="", xc="c"){ ;Iw()=Ix(, "c", 1)
Ix(s, xc, 1)
}
Ix(s:="", cx:="", w=0){ ;Ix(, "s")=I("^s")
w ? ClipB(1) : ""
SendInput, % (s="l" ? "{Home}" : "") "+" (s="bl" ? "{Home" : s="el" ? "{End" : s="l" ? "{End" : s="u" ? "{Up" : s="d" ? "{Down" : "^{" (s="b" ? "Home" : s="e" ? "End" : s="wl" ? "Left" : s="wr" ? "Right" : "Sleep 50")) "}" "{Ctrl Down}" cx "{Ctrl Up}"
if w
Clipwait
}
I(x:="", m=0){
SendInput, % m ? "{Click r}{Sleep 10}" x : x
;SendInput, % (!m ? "" : m="t" ? "{Text}" : m="p" ? "{Raw}" : "{Click r}{Sleep 10}") x
}
Iz(x){
Sleep % x
}