GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Nine — Dialog Functions (continued)
Overview
The BrowseFolder function displays a dialog box allowing the user to select a folder and returns the selected path to the script.
Syntax/Parameters
Syntax
string = BrowseFolder ( string title, [string path], [int mode] ) ;
Parameters
title
A string specifying the dialog box’s title.
path
An optional string specifying a starting path to set into the dialog. If the path does not exist, the segments are trimmed until a valid position is found. If a path cannot be resolved, the dialog is set to the first available path in the dialog. The parameter can be an empty string.
mode
An optional int specifying the scoping mode. By default, the mode is BROWSE_EXPLORE. This is only important if scoping is used within the application. Since the script may not know of scoping, it should indicate the type of action. To use this parameter, path must be provided.
Return Value
Returns a string containing the selected path or an empty string on failure. Use the GetLastError function to retrieve error information.
The result is UTF encoded to allow the representation of Unicode data. Use the UTFToUnicode function and related functions to convert to Unicode.
Remarks
The BrowseFolder function displays a unified dialog box that permits the user to select a folder on the file system. For example, the following code:
s1 = BrowseFolder("Test Get Folder");
results in:
Selecting a pseudo folder such as “Desktop” or “My Documents” will return the actual location within the operating system.
If the user cancels the browse function, the GetLastError function will return ERROR_CANCEL.
The mode parameter allows the scoping to be performed. If omitted, both open and save path scopes are used. The values can be as follows:
BROWSE_EXPLORE 0 — Free Standing Explorer
BROWSE_OPEN 1 — Open Browse Dialog
BROWSE_SAVE 2 — Save Browse Dialog
BROWSE_ADMIN 3 — Administrative (setup, no scope)
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.