Switch to full style
About SheepShaver, a PPC Mac emulator for Windows, MacOSX, and Linux that can run System 7.5.3 through MacOS 9.0.4.
Post a reply

Feature Request: AppleScript

Fri Jun 23, 2017 8:36 pm

If you're open to a request for a new feature in the next version, would it be possible to set up SheepShaver to accept AppleEvents in OS X and pass them on to OS9 applications?

Ideally I'd like to write a script along the lines of:

tell application "Sheep Shaver"
tell app "HyperCard"
--do some stuff
end tell
end tell

* FYI, Love sheep shaver and run it all the time.

Also, I was having an issue in Yosemite where every time I would try to launch it would quit at the first screen; launch again it quit at the second screen; launch a third time it would run.

Seems to have gone away when I upgraded to El Capitan.

Re: Feature Request: AppleScript

Fri Jun 23, 2017 9:09 pm

SheepShaver hasn't actively been developed since 2009, and the last recompile to target "modern" versions of OS X was in 2014. SheepShaver has no current developer, although a few people have poked at it over the years to add features they really wanted, usually things that could be tacked on without modifying the emulator itself. We may be getting close to the point where SheepShaver no longer works under a current OS, although it seems to still function under High Sierra.

I've long thought that passing Apple Events between guest and host would be a neat trick for any emulator, but it's unlikely to make it into SheepShaver unless you can convince someone with the skill and time that it's worth it.

The highest priorities on SheepShaver are:
    Make it 64-bit functional
    Fix the memory management
    Fix the security model

Without those changes, its days are numbered. At least we've got QEMU-PPC under active development now. Unfortunately, it's unlikely to get Apple Event passing either, as that's something you need to bake right in to the emulator, and QEMU is multiplatform.

Re: Feature Request: AppleScript

Sat Jun 24, 2017 7:56 pm

Which version of Mac OS added Remote Events to AppleScript?

I'm thinking if that was in the classic Mac OS (or if an extension existed to provide that functionality), then you could do what you want by treating the SheepShaver machine as a remote machine.

Re: Feature Request: AppleScript

Sat Jun 24, 2017 9:21 pm

Apple Events could be sent remotely via AppleTalk since System 7 I believe, but only via TCP/IP since OS 9. So as long as the host and guest can see each other, this is technically feasible using OS 9.

[edit] Try this out as a test case:
http://web.suffieldacademy.org/ils/neta ... _shutdown/

[edit2] So the following *should* work:
On host:
osascript -l AppleScript -e "tell Application \"Hypercard\" of machine \"eppc://username:password@hostname\" to activate --dosomestuff end tell"

assuming you've got things configured on the guest as per the link. This also means that the guest *should* be able to send apple events to the host, for things like printing as well!

[edit3] Probably also worth noting that SLiRP networking doesn't let the guest and host talk to each other. You need to use TAP networking instead, or send apple events from a different computer / over a different network interface than the guest OS is using.
Post a reply