• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripts on Mac OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripts on Mac OS X?


  • Subject: Re: Scripts on Mac OS X?
  • From: Christopher Nebel <email@hidden>
  • Date: Sun, 23 Sep 2001 13:04:17 -0700

On Sunday, September 23, 2001, at 09:17 AM, Stephen Swift (aka Burnum) wrote:

I'm designing a program/script for Mac OS 9. I'd like it to work with Mac
OS X however. It uses the scripting additions
Akua Sweets
Dialog Director

These haven't been carbonized correct? So, Classic is my only option right?

For the time being, yes.

When I try to run the script, it asks to see where AIM is stored. I select
it and get the error message: "<<Script>> doesn't understand the <<event
DidiInit>> message."

Now this is what I've concluded:
I've scripted installers for the scripting additions to be installed in the
scripting additions folder (path to sa folder). Now, is this different in
Mac OS X? How do I install scripting additions in Mac OS X?

You install scripting additions much as you do in classic Mac OS, by putting them in the scripting additions folder. The tricky bit is that there are several different ones.

If your script is running in Classic, then it uses the Classic system folder's Scripting Additions folder. Classic AppleScript completely ignores additions in the X-native folders, and vice versa for native AppleScript. The native "path to" can't tell you where the classic additions folder is, though you could tell some classic application to "get path to the scripting additions folder", and that would work.

X-native scripting additions can go in any of four different folders. The generally interesting ones are the user folder (~/Library/ScriptingAdditions) and the machine folder (/Library/ScriptingAdditions). There are also network and system addition folders, but you probably don't have the former, and aren't supposed to change the latter. By using the new "from <x> domain" parameter to "path to", you can find out where they all are.

Because all your applets are running in Classic, you should be getting the right answers from "path to". However, I tried out your installers, and while the Akua one works fine for me, the DD one uses an entirely different strategy that doesn't -- it fails on the second line. I'd suggest rewriting it along the lines of the Akua installer.

I've also used that ever so helpful tell me to +event ascrgdut;. Does that work in Mac OS X?

Telling yourself to <<event ascrgdut>> works fine in Mac OS X; telling other applications to do so usually doesn't. However, the particular place you're using it in the DD installer is not necessary, since running an applet does an ascrgdut implicitly.


--Chris Nebel
AppleScript Engineering


References: 
 >Scripts on Mac OS X? (From: "Stephen Swift (aka Burnum)" <email@hidden>)

  • Prev by Date: RE: What's the biggest barrier to wider AS adoption?
  • Next by Date: keyboard shortcuts?
  • Previous by thread: Scripts on Mac OS X?
  • Next by thread: Problems Scriping Quark
  • Index(es):
    • Date
    • Thread