Core Function FolderSelectDialog

From Sputnik Wiki
Revision as of 10:35, 28 November 2011 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
FolderSelectDialog ( <text>, <dir>, <flag>, <init dir> )

Contents

Description

Initiates a Browse For Folder Dialog.

Parameters

title

Text greeting in dialog.

dir

Root directory of GUI file tree. Use "" for Desktop to be root.

flag

Optional;

1 = Show Create Folder Button (requires IE6.0 or later)
2 = Use New Dialog Style (requires IE5.0 or later)
4 = Show Edit Control (to type a foldername)

init dir

Initial/start directory that will be selected if exist.

Return Value

Success: Returns full path of the folder chosen.

Failure: Returns a blank string.


Remarks

The root dir will be chosen if the inital dir (if given) does not exist.

A nonexistent root dir will also cause the Desktop folder to be root.

The "Create Folder Button" option may require Windows XP with IE6 in order to work.

Special Windows folders (such as "My Documents") can be set at root by using the right CLSID detailed in the Appendix.

Example

$var = FolderSelectDialog("Choose a folder.", "");
 
If (!$var)
{
    MsgBox("No Folder chosen");
}
Else
{
    MsgBox("You chose the folder $var");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox