Create a "stay-open" script that runs at startup. Here is an outline of how it works, using WordPerfect as an example. It isn't enough to activate an application and then go to "on idle" - you have to wait until the process starts.
I've offered a prompt before shutting down, but of course you can simply skip the prompt and shut down without warning.
Replace "WordPerfect" with the application you want to use....
Code: Select all
tell application "WordPerfect" to activate
set wpActive to false
with timeout of 5 seconds
tell application "Finder"
repeat until wpActive is true
if (get name of every process) contains "WordPerfect" then
set wpActive to true
end if
delay 0.2
end repeat
end tell
end timeout
on idle
tell application "Finder"
if (get name of every process) contains "WordPerfect" then
else
activate
display dialog "Quit SheepShaver?" buttons {"Yes", "No"} default button 1
if button returned of result is "Yes" then
shut down
error number -128
end if
end if
end tell
return 1
end idle
PS: This also seems to work in Basilisk II with System 7.6.1.