Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
- Subject: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
- From: Jon Pugh <email@hidden>
- Date: Sun, 15 Mar 2009 22:31:17 -0700
At 9:03 AM +1100 3/16/09, Shane Stanley wrote:
>As it happens, I've been doing some stuff in InDesign lately, including some
>in javascript. One of the things that struck me again is just how clear and
>readable a compound whose clause is can be in AppleScript. You can look at
>old code and see in an instant what was happening, without having to dig
>through multiple loops of iteration. But then I looked at sections of code
>doing string manipulation with TIDs rather than basic commands like split
>and so on, and was struck by exactly the reverse.
This is precisely why I wrote and use my SmartString class. It results in easy to read string code and by using code that is "known to work", there's a lot less screwing around.
http://www.seanet.com/~jonpugh/software/SmartString.applescript
(The file is MacOS Roman encoding.)
It doesn't use whose clauses, but it hides the tid and offset manipulation. It has several splitters, beforeString and afterString plus manipulators like replaceStrings, keepLastToken and deleteFirstToken.
When using Script Debugger, including a library is basically a button click and menu choice. It's one of the many "single features that are worth its price".
This Public Scripting Announcement was approved by me.
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden