Ticket #2723: FileSelectFolder.txt

File FileSelectFolder.txt, 1.9 KB (added by mLipok, 10 years ago)
Line 
1###Function###
2FileSelectFolder
3
4###Description###
5Initiates a Browse For Folder dialog.
6
7###Syntax###
8FileSelectFolder ( "dialog text", "root dir" [, flag = 0 [, "initial dir" [, hwnd]]] )
9
10
11###Parameters###
12@@ParamTable@@
13dialog text
14        Text greeting in dialog.
15root dir
16        Root directory of GUI file tree. It limits a choice in the root folder. Use "" for Desktop to be root.
17flag
18        [optional]
19                $FSF_SCHOWCREATEBUTTON (1) = Show Create Folder Button (XP only)
20                $FSF_NEWDIALOGSTYLE (2) = Use New Dialog Style (XP only)
21                $FSF_SHOWEDITCONTROL (4) = Show Edit Control (XP only)
22        Constants are defined in FileConstants.au3
23initial dir
24        [optional] The full path of the folder you selected/highlighted when displaying dialogue (if it exists in the root folder). Default is blank ("").
25hwnd
26        [optional] The window handle to use as the parent for this dialog.
27@@End@@
28
29###ReturnValue###
30@@ReturnTable@@
31Success:        the full path of the folder chosen.
32Failure:        "" (empty string) and sets the @error flag to 1 if user cancels/closes the window.
33@@End@@
34
35
36###Remarks###
37The root dir will be chosen if the initial dir (if given) does not exist.
38A nonexistent root dir will also cause the Desktop folder to be root.
39Special Windows folders (such as "My Documents") can be set as root by using the right CLSID detailed in the <a href="../appendix/clsid.htm">Appendix</a>.
40UNC paths are not supported.  If you think that user's may choose files on a UNC path then the path needs to be mapped as a drive first.
41
42The new vista+ dialog style is used if possible, regardless of the Use New Dialog Style flag. With the vista dialog style the edit control and create folder buttons are always shown, ignoring the flags parameter, and the dialog text parameter sets the title of the window.
43
44
45###Related###
46FileOpenDialog, FileSaveDialog
47
48
49###Example###
50@@IncludeExample@@