Jump to content
Sign in to follow this  
JonF

Multiple directory select?

Recommended Posts

JonF

For a GUI front-end for a command-line AV scanner, I need to pop up a dialog in which the user can select multiple directories. The ideal return value would be a space-separated string (with double quotes around directories that have embedded spaces), but I can manipulate just about any return value. The FleSelectDirectory function is close, but it only selects one directory. I don't find any "multiple select directory box" scripts in Google or the AutoIT includes or this forum. I'm surprised that nobody seems to have done this before ...

Share this post


Link to post
Share on other sites
somdcomputerguy

For a GUI front-end for a command-line AV scanner, I need to pop up a dialog in which the user can select multiple directories. The ideal return value would be a space-separated string (with double quotes around directories that have embedded spaces), but I can manipulate just about any return value. The FleSelectDirectory function is close, but it only selects one directory. I don't find any "multiple select directory box" scripts in Google or the AutoIT includes or this forum. I'm surprised that nobody seems to have done this before ...

Use the CTRL key to select more than one. So <CTRL> + Click. That might work. Edited by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
GEOSoft

It's been done before using either a Treeview or a Listview control. You'll have to search example scripts. Somehow I thought there was also something in the help file but I can't see it now.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Zinthose

Use the CTRL key to select more than one. So <CTRL> + Click. That might work.

First of all I want to apologize for resurrecting an old thread but I didn't find the answer on the formns and wanted to share my snippet/solution for the Googlers that find this post.

#include <GuiTreeView.au3>

Dim $hTreeView = ControlGetHandle("Job Scheduling Wizard", "What computers should the job(s) apply to?", 1175)

TreeViewMultiSelect($hTreeView, "ComputerName_1")
TreeViewMultiSelect($hTreeView, "ComputerName_2")
TreeViewMultiSelect($hTreeView, "ComputerName_3")

Func TreeViewMultiSelect($hTreeView, $ThingToSelect)
    Dim $hItem = _GUICtrlTreeView_FindItem($hTreeView, $ThingToSelect)
    If Not _GUICtrlTreeView_GetSelected($hTreeView, $hItem) Then
        Send("{CTRLDOWN}")
            _GUICtrlTreeView_SelectItem($hTreeView, $hItem)
        Send("{CTRLUP}")
    EndIf
EndFunc

--- TTFN

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×