Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
close printing
close file fileName
close [document { in | with } ] ¬
application
close { externalWindow | card window}
The close printing
command ends a print job previously begun with an open printing
command.
The close file
command closes a disk file previously opened with the open file
command. Usually, you open files to import or export text. Always use close file
when you’re finished.
If you try to close an unopened file, the result
gets File not open.
HyperCard automatically closes all open files when
exit to HyperCard
statement,You must provide the full path name of the file if it’s not at the same directory level as HyperCard.
The close [document {in|with}] application
command closes the named running document, application, or desk accessory. (The words in
and with
are synonymous.)
Note: This command works only with Apple event-aware applications running under System 7 on the same Macintosh as HyperCard.
If the document or application isn’t running, the result
is set to No such document
or No such application
as appropriate.
The form close application sends a quit Apple event, while the form close document {in|with} application
sends a clos
Apple event.
All Apple event-aware applications support the quit
Apple event, but they don’t all support clos
.
The close externalWindow
command closes an external window—a palette or other window displayed by an external command or external function—and removes it from the window list.
Thus you can’t show
an external window once you’ve closed it; you’ll have to create a new one using its external command or external function.
The close card window
command closes the frontmost stack if at least two stacks are open.
HyperCard also sends the close
command to the current card when the user clicks the close box of the card window. You can handle the message as follows:
on close
statements
end close
close printing
close "MicroSoft Works"
close "Alarm Clock"
close file "My Data File"
close file "Simonides:Help Text"
close file theOpenFile
close window "Script of stack My HD:Home" -- external window
close window "Navigator" -- external window
close card window
close window "Home"
"my stack"
"HD20:Wally's Stacks:my stack"
"my file alias"
"MicroSoft Word"
"HD20:Applications:MacWrite"
"Claris MacWrite alias"
window "navigator"
window "Script of stack My HD:Home"
window "JT's Cool Palette"
See also: window
placeholder put "Hello world" -- built-in command
get total(field 1) -- function call
global HelpInfo -- keyword
Commands
Version 0.7b1 (March 24, 2022)