Guest imanuelga Posted May 30, 2005 Share Posted May 30, 2005 hello all !! in a file list, i use send("{end}") to selecte a file but i don't know the name of it. i would like to get this name in a varible. Something like : $nameof = selectedfilegettext... is it possible ? thanks by advance Link to comment Share on other sites More sharing options...
j.gilbert Posted May 31, 2005 Share Posted May 31, 2005 hello all !! in a file list, i use send("{end}") to selecte a file but i don't know the name of it.i would like to get this name in a varible.Something like :$nameof = selectedfilegettext...is it possible ?thanks by advance<{POST_SNAPBACK}>Not sure what you mean. Can you describe more? Are you saying that you want to send the cursor to the end of a list in a file and then want to copy the last word (which is the file name that you won't know) into a variable? Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted May 31, 2005 Share Posted May 31, 2005 FileList?.. hmm, what you mean, try post ypur script it would help alot... Link to comment Share on other sites More sharing options...
Guest imanuelga Posted May 31, 2005 Share Posted May 31, 2005 Hello J.gilbert,Hello freekill, here my script : --------------------------------------------------------------------------- dim $selectedfilename ;open a directory (with files) run ("C:\WINDOWS\explorer.exe C:\Documents and Settings\Propriétaire\Mes documents\downloaded") WinWaitActive("downloaded") ;select the last file Send("{end}") ;I wish to get the name of this file $selectedfilename = ??????? ----------------------------------------------------------------------------- i hope you understand my prbm. Sorry for my poor english... bye Link to comment Share on other sites More sharing options...
sylvanie Posted May 31, 2005 Share Posted May 31, 2005 Hello, Is it what you're looking for ? dim $selectedfilename ;open a directory (with files) run ("C:\WINDOWS\explorer.exe C:\Documents and Settings\ludo\Mes documents\") WinWaitActive("Mes documents") ;select the last file Send("{end}") $index=ControlListView ( "Mes documents", "", 1, "GetSelected") MsgBox(0,"debug",ControlListView ( "Mes documents", "", 1, "GetText",$index)) Link to comment Share on other sites More sharing options...
Guest imanuelga Posted June 2, 2005 Share Posted June 2, 2005 Hello,Is it what you're looking for ?dim $selectedfilename ;open a directory (with files) run ("C:\WINDOWS\explorer.exe C:\Documents and Settings\ludo\Mes documents\") WinWaitActive("Mes documents") ;select the last file Send("{end}") $index=ControlListView ( "Mes documents", "", 1, "GetSelected") MsgBox(0,"debug",ControlListView ( "Mes documents", "", 1, "GetText",$index))<{POST_SNAPBACK}>thank you sylvanie,it was exactly that i was looking for...I'm beginning with autoit and as i m not a fluent speaking english person, i have trubble reading the help files. But in fact, i did find that fonction in the same time you send me this post .Any way, Merci beaucoup imanuelga Link to comment Share on other sites More sharing options...
dilipped Posted July 18, 2014 Share Posted July 18, 2014 (edited) Hello, Is it what you're looking for ? dim $selectedfilename ;open a directory (with files) run ("C:\WINDOWS\explorer.exe C:\Documents and Settings\ludo\Mes documents\") WinWaitActive("Mes documents") ;select the last file Send("{end}") $index=ControlListView ( "Mes documents", "", 1, "GetSelected") MsgBox(0,"debug",ControlListView ( "Mes documents", "", 1, "GetText",$index)) This did not work for me. I got 0 in message box. When I checked the control ID for the explorer window, it shows 0. The class is DirectUIHWND with instance 3 Edited July 18, 2014 by dilipped Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 18, 2014 Moderators Share Posted July 18, 2014 dilipped,lasfirst post in this thread dates from over 9 years ago and that the OP has not been online since then? Please do not necro-post like this again - just open a new thread and link to the old one if it is absolutely necessary for understanding the problem. We ask you to do this for two main reasons: - 1. The language advances and the functionality might well be included in core or UDF code by now- 2. The changes in language syntax mean that it is likely that code from more than a couple of years ago may well not run under the current release interpreter without significant modification.Thread locked. 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...
Recommended Posts