views:

302

answers:

2

I'm using the Apple Script Editor that came with Mac System 7.5.5 and trying to run a simple program:

say "Starting to empty the trash."
tell application "Finder"
  empty trash
end tell
say "Finished emptying the trash."

But when I click in the run button, I got this:

Say Error

I got this code from the book AppleScript Language Guide from Apple, published in 1999.

+11  A: 

I'm pretty sure the problem here is that the say command is not supported by the version of Applescript that ships with MacOS 7.5.5. I'm not sure exactly which version of Applescript that is, but I found this page in the Wayback Machine that refers to Applescript 1.1.2 shipping with MacOS 8. The docs page that Michael linked to for the say command is for Applescript 2.1, so I'm guessing say didn't come into being until somewhere in the 8.x or possibly even 9.x era.

Brian Webster
The error is exactly what you get if you replace say with garbage, even on OS X, namely that the first word is interpreted as a new variable, after which quotes don't make sense. Your system doesn't know about say. You can confirm that by looking at the dictionary of the StandardAdditions extension.
Tobias
+1 for pointing out the wayback machine. I just found the content of my old blog again. The one my hosting company managed to delete for good :-)
raoulsson
+2  A: 

This 1996 AppleScript Scripting Additions Guide seems nearly contemporary to System 7.5.5 and does not mention say. You might poke around in something like System:Extensions:Scripting Additions to see if you can pull up their dictionaries. Probably System 7.5.5 predates say.

Chris Johnsen