Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error On Say Function

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 http://img502.imageshack.us/img502/7341/applescripterror.png

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

like image 756
Nathan Campos Avatar asked Dec 13 '22 00:12

Nathan Campos


2 Answers

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.

like image 74
Brian Webster Avatar answered Jan 13 '23 20:01

Brian Webster


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.

like image 41
Chris Johnsen Avatar answered Jan 13 '23 20:01

Chris Johnsen