MACSCRPT Archives

December 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gary (Lists)" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 28 Dec 2007 16:58:31 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
"Peter Baxter" wrote:

> I use a Filemaker pRo database and add a script to run the contents of each
> text field as an AS.  This allows you to use them from within the database.
> 
> In this way you can organise the scripts in any way you like.

I think you cross-posted from the other scripting list, Peter. That's cool.
(I'm cross-posting back.)

But...

Agreed.  I still use an AS-runner FM database (which I'm happy to share).  I
find it very helpful and have many snippets and such from this list and
other places (including old Richard Morton stuff, which still works a
charm.)

Also, for scripting purposes, I prefer to use a small compiled library, as
Mark L. said over there, on the other list.

I have mine set up with Smile's default library settings, so I don't have to
insert it manually, but it works just as well when added to a script in
ScriptEditor, which I sometimes still use for some features that are more
cumbersome in Smile.

Using a small script library is the only way to go for ease of use, IMO.

For those interested in a whole library system developed for AS, you can
check out: <http://applemods.sourceforge.net/modBrowser.html>

There, you can browse and download many libraries (created for older
versions of AppleScript but still mostly all compatible with current AS).

AppleMods were mostly all created by Hamish Sanderson ('has') and they are
powerful and entirely usable, even if a bit cumbersome at the first.

Once a library system like this is in place, you can add your own easily and
avoid common errors related to scope and such (the tools provided include an
automatic Loader to always load in your linked libraries.)

This kind of tool set is most useful for the professional work place,
perhaps, since there is a bit of a learning curve (because AS hasn't really
embraced the Library system, either as a technology or as a community, but
especially the later.)

AppleMods has never really gained much traction (even when it wasn't a
museum site), because of any number of factors (communication, preaching,
NIH-syndrome, cumbersome-seeming set-up, and so on.)

I'd still encourage folks to look over those tools, which are all public
domain (mostly MIT licenses) and can be modified for your own purposes.

There are examples and docs for all, and even though some of the code looks
odd because of poor variable naming in the Loader (IMO).  You end up reading
things like:

    load Loader's makeLoader()

(And worse.) That kind of thing makes some folks close the script window
right away.  I wish things weren't named like that, because objects
(scripts, handlers, variables) become all muddied in the mind.

But, I digress.

-- 
Gary

ATOM RSS1 RSS2