. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

dosSelectFile(string Operation, string StartFolder, string FileName, any FileTypes, string Message)

Presents the user with a file selection dialog of the specified properties and returns the pathname(s) of the user's selection. The file selection dialog may be either an open file dialog or save file dialog. On Windows and MacOS X, the file selection dialog may also be an open multiple files dialog. The starting folder for the dialog box, the default file name, the file types to view and a message to display to the user may also be specified.

Parameters :

Operation : A string specifying the type of file selection dialog to display. This may be "Open" for a single file open, "Save" for a file save or on Windows and MacOS X only, "Open Multiple" for a multiple file open. This parameter is case insensitive. 
StartFolder : A string specifying the pathname to the starting folder for the dialog box. This may be an empty string in which case the starting folder will become the current folder. For example "C:\MyFolder" on Windows or "My Mac:My Folder" on MacOS. Note that on MacOS classic, if the user has "Last folder used in the application" or "Documents folder" selected in the "Documents" section of the "General Controls" control panel, this parameter will be overridden by a folder selected by the operating system.
FileName : A string specifying the default file name (not pathname) for the dialog box. This parameter is ignored on open dialogs on MacOS. 
FileTypes : A linear list of strings specifying all the types of files to display. On Windows, these should be strings with file extensions without the dot, or "*" for all files, for example, ["txt", "bmp"]. The dialog box will include a type selection for each of the specified types. To display multiple file types in a single type selection, use *.fileType separated by semi colons and omit the first "*.". For example, ["JPG;*.JPEG;*.JPE"] will display all JPEG types in a single type selection. On Windows, you may also supply a message for each file type by specifying additional text after the extension and separating it by a "|", for example ["txt|Text Files", "bmp|Bitmap Files"]. On MacOS, these should be four letter strings specifying the file type signatures, for example ["TEXT", "APPL"]. This parameter will have no effect on save dialogs on MacOS. Specifying an empty linear list will accept any file type. 
Message : A string specifying the message to display to the user. This parameter is ignored on open dialogs on MacOS classic. 

Return Values : If Operation is "Open" or "Save" and the user did not cancel the dialog, a string containing the pathname of the file that the user selected. If Operation is "Open or "Save" and the user canceled the dialog, an empty string is returned. If Operation is "Open Multiple" and the user did not cancel the dialog, a linear list containing strings containing the pathnames of all the selected files is returned. If Operation is "Open Multiple" and the user canceled the dialog, an empty linear list is returned. In case of any error, an empty string is returned if Operation is "Open" or "Save" and an empty list is returned if Operation is "Open Multiple", however an empty string or list may indicate that the user canceled an open or save dialog. Call dosGetLastError() to determine whether an error occurred and if yes, what it was. 

Possible Returned Error Codes via dosGetLastError() :
10001 : Invalid value for parameter 1. 
10004 : Invalid format for parameter 4. 
10031 : Folder not found on system.



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 3/26/2003 1:16:45 PM.