HyperCard 2.0v2: "The Suspended" Global Variable (7/92)

Here's an undocumented feature of HyperCard 2.0v2. It's a built in global
variable called "the suspended." This variable is normally false but is
set to true when you open another application using the open[filename
with] application command.

This is an important feature if you are running under MultiFinder and start
a handler that uses the open application command with additional messages
after the open command. What will happen is that HyperCard will start
launching the application and then continue to finish the other commands
while it is running in the background. Therefore, if you want to suspend
any pending commands that follow the open application command until after
HyperCard gains control you might want to use the following structure:

on exampleHandler
open "Text File" with "MacWrite II"
wait 1 second -- assure following loop works
repeat until var is false
put the suspended into var
end repeat
beep
go next card
end exampleHandler


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012