Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
open application
open fileName with application
The open
command launches another application program or opens a document with another application from within HyperCard. You must provide the full path names for the files if they’re not at the same directory level as HyperCard. suspend
system message to the current card before turning over control to the application. the result
to Cancel
if the user clicks Cancel in the dialog box. Otherwise, it sets the result
to empty
. the result
to "Couldn't open that application."
open "TeachText"
open "Read Me" with "Teach Text"
open "the document you want" with "the application" -- invoke dialog box
answer file "Start what application?" of type application
if it is not empty then open it
on mouseUp
-- this demo only works with System 7
if not systemSeven() then exit mouseUp
-- asks the user for an application
put askForApplication() into appName
if appName is empty then exit mouseUp
open appName -- open the selected application
wait 5
open the long name of HyperCard -- bring HyperCard to front
wait 30
close appName -- close the just opened application
end mouseUp
function askForApplication
answer file "Select an application to open:" of type "APPL"
if it is empty then return empty
if it is the long name of HyperCard then
-- the user selected the current running HyperCard
answer "Try selecting an application other than HyperCard."
return askForApplication() -- recursion
else return it
end askForApplication
function systemSeven
return the systemVersion ≥ 7.0
end systemSeven
"MicroSoft Word"
"HD20:Applications:MacWrite"
"Claris MacWrite alias"
"my stack"
"HD20:Wally's Stacks:my stack"
"my file alias"
Commands
Version 0.7b1 (March 24, 2022)