 |
THE HYPERCARD CENTER |
|
|
Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
open fileopen file fileName
The open file command opens the specified file so that you can read data from it and write to it. Usually, the file is an ASCII text file opened to allow importing or exporting text. If the file doesn’t exist, HyperCard creates it. Use the close file command to close files after you’ve opened them. Note: You must provide the full path name of the file if it’s not at the same directory level as HyperCard. If HyperCard has problems opening the specified file, it sets the result as follows: Nonexistent file that can't be created: Can't create that file.
Existing file already open: File is already open.
Other error opening file: Can't open that file.
Examplesopen file "My Data" answer file "Import text from:" of type text put it into theFile if theFile is not empty then open file theFile ... -- process the file close file theFile end if
Related Topics Placeholders
fileNameAn expression that evaluates to a text string that is also a valid Macintosh filename. For example: "my stack" "HD20:Wally's Stacks:my stack" "my file alias"
HyperTalk Reference
|