click
here for more groovy stuff like this
$Ctrl = false
if _IsPressed(11) then
$Ctrl = true
if
$CmdLine[0] then
$copy =
"" for
$i = 1 to
$CmdLine[0]
$path =
$CmdLine[
$i]
if
$Ctrl then
$path = FileGetShortName(
$path)
if StringRight(
$path, 1) = '
"' then
$path = StringTrimRight($path, 1)
$path = StringTrimLeft($path, 1)
endif
$copy &= $path & @CRLF
next
ClipPut(StringStripWS($copy, 3))
else
MsgBox(0, "Drag & Drop Only!
", "To use: Drag and drop stuff onto me, or a shortcut to me.
" & @LF & @LF & _
"The path information will be placed in your system clipboard,
" & @LF & _
"so you can immediately paste it wherever you need (Ctrl+V).
" & @LF & @LF & _
"Okay, technically, you could also launch me with paths on the
" & @LF & _
"command-line, but to save typing, you would first need to get
" & @LF & _
"those paths into your clipboard, which is of course, my job!
")
endif
func _IsPressed($Key)
local $kp = DllCall('user32.dll', "int
", "GetAsyncKeyState
", "int
", '0x' & $Key)
if not @error and BitAND($kp[0], 0x8000) = 0x8000 then return 1
return 0
endfunc
"