AutoHotkey Community

It is currently May 26th, 2012, 11:30 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: November 13th, 2008, 2:07 pm 
Offline

Joined: April 28th, 2006, 12:12 pm
Posts: 55
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2008, 2:21 pm 
Offline

Joined: April 20th, 2006, 5:11 pm
Posts: 75
Location: Vienna
Code:
Send, ^c
?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2008, 2:27 pm 
Offline

Joined: June 9th, 2008, 2:32 am
Posts: 936
Location: Canada
look up
FileSelectFile

and

FileselectFolder

_________________
Image
I know i have 6 legs. It's cuz I'm special.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2008, 2:52 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Read the clipboard documentation there you will see indeed that it is a simple ctrl-c action.

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2008, 4:00 pm 
Offline

Joined: April 28th, 2006, 12:12 pm
Posts: 55
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2008, 4:16 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 13th, 2008, 4:24 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
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

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2008, 2:31 am 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
Code:
ControlGet, name, List, Selected, SysListView321, ahk_class CabinetWClass
MsgBox, %name%


...another alternative.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2008, 11:24 am 
Offline

Joined: April 28th, 2006, 12:12 pm
Posts: 55
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%


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: 0x150||ISO, BrandonHotkey, Exabot [Bot], Google Feedfetcher, Yahoo [Bot] and 46 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group