SnArF Posted January 26, 2004 Share Posted January 26, 2004 How do i get the name of a selected file or dir from windows When I use controlgettext it shows only the current dir My scripts: _ConsoleWriteLog | _FileArray2D Link to comment Share on other sites More sharing options...
CyberSlug Posted January 26, 2004 Share Posted January 26, 2004 (edited) If you mean a selected file/folder in Explorer or :My Computer", then I don't think you easily can. (There are some third-party utilites such as CopyText that can do this; but it takes some work to integrate/automate with AutoIt) Also, try the FileOpenDialog function of AutoIt if if suits your needs.What are you trying to accomplish? Maybe we can help offer alternative ideas. Edited January 26, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
SnArF Posted January 27, 2004 Author Share Posted January 27, 2004 Yes, thats what I want, select files/folders in Explorer en then write the names of the files/folders to an ini file The only value i get is SysListView321 Help please My scripts: _ConsoleWriteLog | _FileArray2D Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 27, 2004 Administrators Share Posted January 27, 2004 If you just want to allow the user to select a number of files and find out what they have picked then you can use FileOpenDialog - it allows the section of multiple files and returns the names of them all seperated by | Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
SnArF Posted January 27, 2004 Author Share Posted January 27, 2004 Thanks Jon, I will use your option, but I think it would be a nice extra function for AutoIT Greetings SnArF My scripts: _ConsoleWriteLog | _FileArray2D Link to comment Share on other sites More sharing options...
trids Posted January 27, 2004 Share Posted January 27, 2004 Yes, thats what I want, select files/folders in Explorer en then write the names of the files/folders to an ini fileYou can modify the following script as necessary. Beware though: depending on how many files you select, they may not all get passed in the $CmdLine[] array .. ;This script is meant to run as the destination EXE ;for a rightclick -> SendTo operation. ; - It's purpose is to place on the clipboard the names fo the files that were sent to it. ; - SPACE delimited and QUOTED list is compatible with TextPad's File/Open dialog. ; - CRLF-delimited list is nice for text listings and documentation If $CmdLine[0] > 0 Then $tmp = "" For $i = 1 to $CmdLine[0] ;SPACE-delimited and QUOTED.. ; $tmp = $tmp & """" & FileGetLongName($CmdLine[$i]) & """ " ; ;CRLF-delimited.. $tmp = $tmp & FileGetLongName($CmdLine[$i]) & @CRLF Next ClipPut(StringTrimRight($tmp,1)) EndIf Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now