AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copy file names from windows explorer ?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Antonimo



Joined: 28 Apr 2006
Posts: 55

PostPosted: Thu Nov 13, 2008 1:07 pm    Post subject: Copy file names from windows explorer ? Reply with quote

I have searched but not found...


Does anybody know of a simple, hotkey activated script that can copy the file names of selected files from a Windows Explorer window?
Back to top
View user's profile Send private message
Obi-Wahn



Joined: 20 Apr 2006
Posts: 75
Location: Vienna

PostPosted: Thu Nov 13, 2008 1:21 pm    Post subject: Reply with quote

Code:
Send, ^c
?
Back to top
View user's profile Send private message Visit poster's website
SpiderGames



Joined: 09 Jun 2008
Posts: 936
Location: Canada

PostPosted: Thu Nov 13, 2008 1:27 pm    Post subject: Reply with quote

look up
FileSelectFile

and

FileselectFolder
_________________

I know i have 6 legs. It's cuz I'm special.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
SoLong&Thx4AllTheFish



Joined: 27 May 2007
Posts: 4999

PostPosted: Thu Nov 13, 2008 1:52 pm    Post subject: Reply with quote

Read the clipboard documentation there you will see indeed that it is a simple ctrl-c action.
_________________
AHK Wiki FAQ
TF : Text files & strings lib, TF Forum
Back to top
View user's profile Send private message
Antonimo



Joined: 28 Apr 2006
Posts: 55

PostPosted: Thu Nov 13, 2008 3:00 pm    Post subject: Reply with quote

Hi Obi-Wahn and HugoV,

Thanks for your replies.

Quote:
Send, ^c

Quote:
Read the clipboard documentation there you will see indeed that it is a simple ctrl-c action.

Please correct me if I'm wrong, but isn't this the same as just using Ctrl + C? The result is that the files are copied.

I would like to copy the file names of the selected files to paste in a document listing a folder's files.

Hi SpiderGames,

Thanks for your reply.

I have been looking at FileSelectFile but I have not worked out how to use it yet. I shall experiment further unless somebody has any other suggestions.
Back to top
View user's profile Send private message
Z_Gecko
Guest





PostPosted: Thu Nov 13, 2008 3:16 pm    Post subject: Reply with quote

Quote:
Please correct me if I'm wrong, but isn't this the same as just using Ctrl + C? The result is that the files are copied.

You are wrong, that´s why HugoV wrote:
Quote:
Read the clipboard documentation there you will see indeed that it is a simple ctrl-c action.

try this on selected files from a Windows Explorer window, to see yourself:
Code:
t::
Send, ^c
MsgBox % Clipboard
return
Back to top
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Thu Nov 13, 2008 3:24 pm    Post subject: Reply with quote

pretty problematic
for some reason unless you manually ctrl+c first it shows the previously selected file

Code:
t::
Clipboard=
SendInput, ^c
Loop
   if Clipboard
      break
MsgBox % Clipboard
return

_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Fri Nov 14, 2008 1:31 am    Post subject: Reply with quote

Code:
ControlGet, name, List, Selected, SysListView321, ahk_class CabinetWClass
MsgBox, %name%


...another alternative.
Back to top
View user's profile Send private message Visit poster's website
Antonimo



Joined: 28 Apr 2006
Posts: 55

PostPosted: Fri Nov 14, 2008 10:24 am    Post subject: Reply with quote

Thanks for putting me straight Z_Gecko,

I have tried your suggestion and I see the file names listed in the Message Box -

Thanks jaco0646,
Your suggestion works very well when I drag the files on to the AHK script - it displays the information in a message box.

Copying the resulting message to the clipboard works when I add an extra line to the end of the script:
Code:
ControlGet, name, List, Selected, SysListView321, ahk_class CabinetWClass
MsgBox, %name%
clipboard = %name%
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group