;---------------------------------------------------------------------------------------------------------------------- #DefineFunction udfAskDirectory (strAD_Prompt, strAD_FolderRoot, strAD_FolderStart, strAD_PromptConfirm, intAD_Flags) Return AskDirectory (strAD_Prompt, strAD_FolderRoot, strAD_FolderStart, strAD_PromptConfirm, intAD_Flags) :CANCEL Return "" ; Return empty string if Dialog has been cancelled resp. closed by escape key. ;.......................................................................................................................................... ; intAD_flags (combined using the binary OR "|" operator, or 0 if none are desired). ; 0 ... None of the following apply. ; 1 ... Display an edit field in the dialog box, in which the user can type the name of a directory which may or may not exist. This name will be relative to the currently selected directory name in the browse list. ; 2 ... If the user types a name in the edit field (see flag #1), of a directory which does not exist, this flag causes a confirmation message box to be displayed, showing the name of the directory that would be returned by the function, and containing three buttons: Yes, No, and Cancel. ; If the user selects 'Yes', the function returns. If the user selects 'No', the directory browse dialog remains displayed, and the user can re-edit the name or select a different directory. 'Cancel' causes the function to return, and standard WIL ":cancel" processing to be performed. ; 4 ... Use the new user interface. Setting this flag provides the user with a larger dialog box that can be resized. The dialog box has several new capabilities including: drag and drop capability within the dialog box, shortcut menus, new folders, delete, and other shortcut menu commands. ; 8 ... Do not include the "New Folder" button in the browse dialog box. ; NOTE: This is supported only in Windows XP or newer. In older versions of Windows, this flag is ignored. ; 16 ... Suppress "Drive not ready" errors. ;.......................................................................................................................................... #EndFunction ;---------------------------------------------------------------------------------------------------------------------- ; Test. strAD_Prompt = "Select a folder for your files." strAD_FolderRoot = "" strAD_FolderStart = Environment ("TEMP") strAD_PromptConfirm = "Do you really want to use this folder name, which does not exist yet?" intAD_Flags = 1 | 2 | 4 | 16 strFolderPath = udfAskDirectory (strAD_Prompt, strAD_FolderRoot, strAD_FolderStart, strAD_PromptConfirm, intAD_Flags) :CANCEL Exit