That seemed like an interesting problem, and here's a solution, based entirely on an idea that John Rethorst invented (in the WordPerfectMac Yahoo group) for using WPMac in SheepShaver to open WP files on the OS X desktop.
First, inside SheepShaver, paste the following script into the Mac OS 8/9 Script Editor. Then, using the Save dialog box, save it as Kind: Application, with the "Stay Open" and "Never Show Startup Screen" options both checked. Name it whatever you like, perhaps "ShutMeDown". Move the script into the Startup Items folder in the System Folder in SheepShaver.
Here is the script:
Code: Select all
global shutSignal, shutFound
on run
tell application "Finder"
set shutSignal to ("Unix:shutSignal.txt")
try
set shutFound to true
tell application "Finder"
set shutSignal to shutSignal as alias
end tell
on error
set shutFound to false
end try
end tell
if shutFound is true then
tell application "Finder" to delete shutSignal
delay 1
end if
end run
on idle
tell application "Finder"
try
set shutSignal to shutSignal as alias
my doShutdown()
on error
return 0.5
end try
end tell
end idle
on doShutdown()
tell application "Finder" to delete shutSignal
tell application "Finder" to shut down
error number -128
end doShutdown
Now, with SheepShaver still open, open the SheepShaver Preferences, find the field labeled "Unix Root:" and take careful note of the path in that field. (I can't copy the path it to the clipboard from the SheepShaver build that I use; you may be luckier.) Cancel your way out of the preferences, and shut down SheepShaver.
Next, in the OS X Script Editor (or AppleScript Editor, depending on your OS X version), create a new, blank script, and type the following in the first line:
Code: Select all
set signalPath to "
Code: Select all
set signalPath to "/Users/yourname/Documents/
Next, type in the filename shutSignal.txt followed by a quotation mark, so the line looks like this:
Code: Select all
set signalPath to "/Users/yourname/Documents/shutSignal.txt"
Code: Select all
set signalPath to "/Users/yourname/Documents/shutSignal.txt"
do shell script "echo >" & quoted form of signalPath
Save this script to your OS X desktop as an application; perhaps name it SheepShut.
Now, start up SheepShaver. The ShutMeDown script will automatically run in the background while you run any other program you want to run in SheepShaver.
If you want to quit SheepShaver from OS X, perhaps because the SheepShaver window is minimized, or you're working on something else in OS X, run the SheepShut script in OS X. Be patient. After a few seconds, SheepShaver will shut down.
Probably this can be made faster by changing the delay in the SheepShaver script. Any suggestions will be useful