RobertBedrosian Posted February 15, 2011 Share Posted February 15, 2011 I have a really awful way of getting the name of a selected file in a directory. Surely, there's a better way, but I can't find it in Help. Help, please. Func GetFileName() Send("{APPSKEY}") Sleep(200) Send("m") Sleep(200) Send("^{c}") Send("{ESC}") $filename = ClipGet() ; MsgBox(0, "", $filename) EndFunc ;==>GetFileName Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 15, 2011 Share Posted February 15, 2011 Most people would use FileSaveDialog or FileOpenDialog. Link to comment Share on other sites More sharing options...
RobertBedrosian Posted February 15, 2011 Author Share Posted February 15, 2011 Most people would use FileSaveDialog or FileOpenDialog.Richard,Wouldn't that bring up the dialog box? What I am looking for is a function that provides the information that the Properties option on the Appsmenu does, but maybe more info. The function I'm hoping to find would provide information such as long and short file names of whichever file happens to have the focus in whichever directory I'm in. Link to comment Share on other sites More sharing options...
Mat Posted February 15, 2011 Share Posted February 15, 2011 It's a listview isn't it? So why not use ControlListView AutoIt Project Listing Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 15, 2011 Share Posted February 15, 2011 Well I didn't understand the context of your question. Link to comment Share on other sites More sharing options...
RobertBedrosian Posted February 15, 2011 Author Share Posted February 15, 2011 Well I didn't understand the context of your question.It's my fault.I want to pass the name of a selected file as a token to an application. Like the Sendto option. The method I use (which I'm looking to replace) manipulates keys with the Sendkeys and extracts a file name. I was hoping there was an AutoIt function that would just give information about whichever object is highlighted in a directory. For example, I go into my Html directory and arrow down and decide I want to check a particular file using HTML-Kit. So I get the file name of the highlighted file, as shown above and in my AutoIt application I issue:ShellExecute("C:\Program Files\Chami\HTML-Kit\Bin\HTMLKit.exe", 'C:\Test2\'&$filename)Window must have a slew of information about any particular file or object that is highlighted. What I am wondering is if AutoIt can provide that information. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 15, 2011 Moderators Share Posted February 15, 2011 RobertBedrosian, Go and look at your double post in the Help section - you have the answers there (as well as from Mat here). M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
TheSaint Posted February 20, 2011 Share Posted February 20, 2011 If this is indeed part of a double post, then it's the post here that needs removing, as this is the CHAT section NOT HELP section. At the very least, it needs relocation. RobertBedrosian you should know better ... and Melba23 is being too kind to you! Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
KaFu Posted February 20, 2011 Share Posted February 20, 2011 Give a try ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) 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