global $Ctrl = false
global $Shift = false
if _IsPressed(11) then $Ctrl = true
if _IsPressed(10) then $Shift = true
if $CmdLine then
global $copy = ""
for $i = 1 to $CmdLine
global $path = $CmdLine[$i]
if $Ctrl then $path = FileGetShortName($path)
if $Shift then
local $UNC_Array = _WinNet_GetUniversalName($path)
$path = $UNC_Array & $UNC_Array
if StringRight($path, 1) = '"' then
$path = StringTrimRight($path, 1)
$path = StringTrimLeft($path, 1)
$copy &= $path & @CRLF
MsgBox(0, "'Clipboard As Name', from corz.org ", "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 it (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! " & @LF & @LF & _
"Hold down the Ctrl key while you drag & drop for the 'short' path. " & @LF & _
"Hold down the Shift key for REAL network path of a mapped resource.")
local $kp = DllCall('user32.dll', "int", "GetAsyncKeyState", "int", '0x' & $Key)
if not @error and BitAND($kp, 0x8000) = 0x8000 then return 1
0.2 Added multiple files capability
0.1 One line of code. cool!
Welcome to corz.org!
If something isn't working, I'm probably improving it, try again in a minute. If it's still not working, please mail me!