Is it feasible to obtain a script that does the following?:
When you click on a certain file in any windows folder, it copies its address to the clipboard. The same for the folder.
For example:
Ex1: Click on file "Activities.txt"
Clipboard = C://My Folder/Activities.txt
Or
Ex2: Click on folder "My Folder"
Clipboard = C://My Folder/
Adress File or Folder to Clipboard
-
- Posts: 264
- Joined: 09 Mar 2019, 01:52
- Location: Germany
- Contact:
Re: Adress File or Folder to Clipboard
You could try the search function of this forum. It's pretty good. =)
https://www.autohotkey.com/boards/viewtopic.php?t=23788
https://www.autohotkey.com/boards/viewtopic.php?t=23788
-
- Posts: 264
- Joined: 09 Mar 2019, 01:52
- Location: Germany
- Contact:
Re: Adress File or Folder to Clipboard
Forgot to write.
To execute the hotkey with the mousebutton you have only to change F6 to ^lbutton. But beware, if you executing things like copy to clipboard on every click, it can cause a strange behaviour in some programs or situations. i would recommend that you use a F-key or someting else after selecting the file or folder with the mouse.
To execute the hotkey with the mousebutton you have only to change F6 to ^lbutton. But beware, if you executing things like copy to clipboard on every click, it can cause a strange behaviour in some programs or situations. i would recommend that you use a F-key or someting else after selecting the file or folder with the mouse.
Re: Adress File or Folder to Clipboard
One easy way, without AutoHotkey is to use SHIFT + Right-Click, and select "Copy as Path". The only downside (for you I think) is that when copied, the path is in quotes, but those should be easy enough to remove for whatever you need.
« AHK Portable Installer » | « CallTipsForAll » | « TheArkive AHK v1 Scripts » | « TheArkive AHK v2 Scrpts » | « TheArkive on GitHub »
Re: Adress File or Folder to Clipboard
Select one or more files from an explorer window and press ctrl+1:
Code: Select all
^1::
MsgBox % clipboard := Explorer_GetSelection()
return
Explorer_GetSelection(hwnd="") {
hwnd := hwnd ? hwnd : WinExist("A")
WinGetClass class, ahk_id %hwnd%
if (class="CabinetWClass" or class="ExploreWClass" or class="Progman" or class="#32770") {
for window in ComObjCreate("Shell.Application").Windows {
if (window.hwnd==hwnd) {
sel := window.Document.SelectedItems
}
}
}
for item in sel
ToReturn .= item.path "`n"
return RTrim(ToReturn,"`n")
}
ExitApp
*Esc::
ExitApp
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
- Kellyzkorner_NJ
- Posts: 84
- Joined: 20 Oct 2017, 18:33
Re: Adress File or Folder to Clipboard
I don't mean to hijack this post but I'm wondering if this is something that is a component of what I've been trying to do for at least a year. What I want to do is, in Windows Explorer I'm highlighting files/folders I want to move and selecting move (unless this can be made part of the hotkey). Then, the main thing I can't figure out is once I've placed the cursor at the folder of where I want these pasted, with a hotkey send the right click, have that right click determine the address of that folder and paste to that folder from there. This would shorten my steps. Hopefully that makes sense.
-
- Posts: 264
- Joined: 09 Mar 2019, 01:52
- Location: Germany
- Contact:
Re: Adress File or Folder to Clipboard
@Kellyzkorner_NJ I don't get your "wish". You can mark files and folders in the explorer window. Press ctrl+x to "cut", select your destination folder and press ctrl+v to paste. This moves all selected. If you press ctrl+c the selected items were copied not moved.
You don't need to use the right mouse button context menu.
You don't need to use the right mouse button context menu.
- Kellyzkorner_NJ
- Posts: 84
- Joined: 20 Oct 2017, 18:33
Re: Adress File or Folder to Clipboard
@Kobaltauge I'm aware of the cut and paste, I left out a step there, I'm pasting often to a file that is IN the folder I want to paste to, as I'm using usually Voidtools' Everything program and the folder isn't necessary there. So I'm right clicking on a file and wanting to find the folder that file is in and paste there. I'm sorry I misspoke and caused confusion. Thank you for your reply.
Who is online
Users browsing this forum: AlFlo and 213 guests