Re: Ok now that I've got MacOS X
Re: Ok now that I've got MacOS X
- Subject: Re: Ok now that I've got MacOS X
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 29 Apr 2001 05:51:07 -0400
on 4/28/01 8:36 PM, James Kelly at email@hidden wrote:
>
When I write scripts can I use my old scripting additions that I used under
>
system 9?
Yes, for the most part, in the Classic environment of Mac OS X; but not in
the Mac OS X environment. Some scripting additions will fail in the classic
environment because they access hardware (the Classic environment uses Mac
OS X system facilities to access hardware). Scripting additions require new
techniques for the Mac OS X environment. New scripting additions for Mac OS
X are starting to appear.
>
Do I have to recompile my old scripts for X?
Yes and no. It isn't an issue of recompiling so much as rewriting. Compiled
scripts and scripts saved as text will run in the Classic Environment on Mac
OS X without recompiling, assuming the syntax works in Classic. Scripts
saved as classic applets, too, with the same caveat. Scripts saved in Mac OS
9.1 as Mac OS X applets will run in the Mac OS X environment, same caveat.
Scripts saved in Mac OS 9 as Mac OS X applets will not run in Mac OS X
without recompiling, because the Mac OS X applet file format got changed out
from under them. Some old scripts will not work in either environment of Mac
OS X because they require rewriting for new syntax. This includes most or
all scripts that access hardware, and all scripts that depend on Mac OS 9
scripting additions that have not been reissued for Mac OS X.
>
Has anyone noticed any changes/caveats I should watch for?
Lots, in addition to the above. Scripting the Finder doesn't work very well,
yet. In the Mac OS X environment, most of the Apple scripting additions are
missing in action, for now, as are most of the third-party scripting
additions. There are some odd situations involving changed syntax; for
example, the Finder's "computer" command is now renamed and moved to the
Standard Additions scripting addition, but neither command is available in
the Classic environment of Mac OS X and old scripts using the "computer"
command therefore will not run in Classic.
But you can expect the situation to improve markedly over the next few
months.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes