#singleinstance force IfLess, 0, 1 If A_IsCompiled { SendToDir = %UserProfile%\SendTo IfNotExist, %SendToDir% { MsgBox, 16,, %SendToDir% not found ExitApp } StringTrimRight, ScriptName, A_ScriptName, 4 FileCreateShortcut, %A_ScriptFullPath%, %SendToDir%\%ScriptName%.lnk , %A_ScriptDir%,,Send to Clipboard as Name,,%A_ScriptFileFullPath% MsgBox, 64,, Shortcut %SendToDir%\%ScriptName%.lnk generated ExitApp } else { MsgBox, 16,, Compile me. ExitApp } ClipBoard= Loop, %0% ; For each parameter: { IfGreater, A_Index, 1 clipboard = %clipboard%`n clipboard := clipboard %A_Index% } CoordMode, ToolTip, Screen ToolTip, %clipboard% -> ClipBoard,0,0 Sleep, 2000
Send to Clipboard as Name
Started by
Venia Legendi
, Sep 02 2005 10:13 AM
2 replies to this topic
Adds Send to Clipboard as Name to the current users send to explorer context menu - Ok, not new, but I needed something witch runs without installation. Demands to be compiled, which is really not needed on systems where autohotkey is installed...
#1
-
Posted 02 September 2005 - 10:13 AM
That something like this works via a shortcut in SendTo is very interesting.
Here are some alternate approaches in case you ever need them:
1) Use "ControlGet, List, List, Selected Col1, SysListView321, A" to get the selected files names. However, this won't get their paths, which would be a disadvantage if you're using it in a file-search window.
2) Copy the files directly from Explorer via Ctrl-C. For example, the following converts the selected files to their full paths and also sorts them alphabetically:
#c:: ; Win+C hotkey
clipboard =
Send, ^c
ClipWait, 2
Sort, clipboard ; This also converts to text.
return
Thanks for sharing your SendTo shortcut approach, which I think will be useful for quite a few things.
Here are some alternate approaches in case you ever need them:
1) Use "ControlGet, List, List, Selected Col1, SysListView321, A" to get the selected files names. However, this won't get their paths, which would be a disadvantage if you're using it in a file-search window.
2) Copy the files directly from Explorer via Ctrl-C. For example, the following converts the selected files to their full paths and also sorts them alphabetically:
#c:: ; Win+C hotkey
clipboard =
Send, ^c
ClipWait, 2
Sort, clipboard ; This also converts to text.
return
Thanks for sharing your SendTo shortcut approach, which I think will be useful for quite a few things.
#2
-
Posted 02 September 2005 - 12:12 PM
That something like this works via a shortcut in SendTo is very interesting.
I use send to a lot, it's more convient when browsing large file system with the mouse. Normally I use Gabriele Ponti's send to extensions http://www.gabrieleponti.com/, but they need to be installed.
In the same way (autohotkey) I've implemented: send to lost+found and make comment file (with extension txt) ...
#3
-
Posted 02 September 2005 - 12:22 PM