Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: feature request: it would be nice if AppleScript noticed changes to an apps dictionary after load time.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request: it would be nice if AppleScript noticed changes to an apps dictionary after load time.



Timothy Bates, email@hidden, wrote:
>Currently, I have to maintain as many copies of these as I have scripts.
>this is a hard task and there is no propagation mechanism, so if I find a
>new efficiency or a bug, I have to manually paste this new change into every
>single script (after first finding them all - forget this if you have
>distributed the files to other users).

I was going to keep quiet, but because you won't let this thing drop...
(grin)

Back in 1998 I wrote a simple AppleScript Addition called "load library".
It works much like Standard Addition's "load script" except it take a
script library name instead of an alias.

The Addition takes the name of the script library to load, and looks for
a script file with the same name in various places, in this order:

<Current Application's Folder>:script libraries:
<System Folder>:Scripts:script libraries: (Mac OS 8.5)
<System Folder>:Scripting Additions:script libraries: (Mac OS 8)
<System Folder>:Extensions:Scripting Additions:script libraries: (System
7)

You can use it like this:

set uppercaseLibrary to load library "uppercase"
tell uppercareLibrary to
set x to uppercase( "Jon" )
end
--> "JON"

But what's really neat is that you can use it directly within a tell
block like so:

tell (load library "uppercase")
set x to uppercase( "Jon" )
end
--> "JON"

This allows you to load a bunch of related handlers at once, and keep
them within a scope block at the same time.

I've never purchased a "real" script editor like Script Debugger or
Scripter, since I'm very content with my load library Addition.

Back when I wrote it, I wanted to make a freeware and commercial version,
but I never figured out a good way to separate the two. Now with X's new
Additions, I could see me giving away the Classic version and selling the
X native version for like $9. Any interest?

.......................................................
Jonathan 'Wolf' Rentzsch jon at redshed dot net
Red Shed Software http://redshed.net (847) 584-7465
PGP: B2AF 1A09 F881 EBDE C9D6 C4D2 C04F A3C0 3EC5 D5F2

"The reason for the rush is the revision, but the
reason for the revision is the rush."




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.