Re: Migrating scripting additions to Mac OS X
Re: Migrating scripting additions to Mac OS X
- Subject: Re: Migrating scripting additions to Mac OS X
- From: List Kreme <email@hidden>
- Date: Thu, 28 Jun 2001 02:28:59 -0600
On 27/06/2001 at 10:58 -0400, Hudson Barton said:
>
Well, I suspect it runs deeper than that. If conversion is as easy
>
as Apple says it is, it's a wonder that every osax of value has not
>
yet made the switch, but in fact NONE have made the switch.
Quite possibly no one has seen a demand yet, or they are still trying to
figure out what changed. I converted a fairly straight forward Eudora
script (if there is such a thing) to OS X. The changes in the syntax for
the finder scripting where, in a word. Odd.
-- Mac OS 9
tell application "Finder"
set FolderContents to get entire contents of FolderContents as list
-- Mac OS X
tell application "Finder"
set FolderContents to get entire contents of FolderContents
The first example doesn't work under OS X. The second doesn't work under OS 9.
I couldn't use this line form the OS 9 version at all:
set MyFolder to container of PathToFile as alias
Errored out on the "as alias" and on the "container" if the "as alias" was
removed.
and the line:
if (f's file type is not "fold") then
became
set {oldTID, AppleScript's text item delimiters} to {AppleScript's text
item delimiters, ":"}
if (f as string)'s last text item is not "" then --it's not a folder
which is not even close to the same.
AppleScript under OS X is quite different, and many of those differences I
don't think we all know quite yet.
The advantage is that the OS X version of the script is blindingly fast.
So fast Eudora doesn't quite have time to catchup and the mailbox views
often do not get updated right away. YMMV.
--