Introduced
5.0
Description
Asks the user to pick a location in the file system. This is useful when doing an import or export that deals with multiple files in the same directory. For example this could be used to ask the user where to save a series of output images.
Scripting Syntax
PickFolder( DefaultFolder, [Title] )
Parameters
|
Parameter |
Type |
Description |
|
DefaultFolder |
Initial folder in the browser |
|
|
Title |
Title for the dialog box |
Return Value
Returns the path that the user picked. It is not guaranteed that the path is valid. An empty string is returned if the user canceled without picking a folder.
Examples
JScript Example
// Example showing how to use the PickFolder command
strTitle = "Choose a folder" ;
strDefault = Application.InstallationPath( siUserPath ) ;
strPickedFolder = XSIUIToolkit.PickFolder( strDefault, strTitle ) ;
if ( strPickedFolder.length == 0 )
{
logmessage( "User didn't make a choice " + strPickedFolder ) ;
}
else
{
logmessage( "User chose " + strPickedFolder ) ;
}
See Also
SOFTIMAGE|XSI v6.01