v5.0
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.
oReturn = PickFolder( [Title], [HelpText], [DefaultValue] ); |
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.
Parameter | Type | Description |
---|---|---|
Title | String | Title for the dialog box |
HelpText | String | Prompt for the user. For example, "Pick the location of the rendered images folder". |
DefaultValue | String | Initial folder in the browser |
// 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 ) ; } |