Re: Libraries and effiency
Re: Libraries and effiency
- Subject: Re: Libraries and effiency
- From: Tommy Bollman <email@hidden>
- Date: Wed, 11 Aug 2010 14:31:04 +0200
Hello.
It can easily be done scripting several applications with one code base, I for instance manage to at least a certain extent to script all three script editors, sharing the same code base. I can also create script for a cluster of text -editors, and that points in a different direction.
The advantages of this, is that maintaining the script becomes far easier for both the user, and the programmer. There is only one menu item and one short cut key to relate to for the user, and the programmer, can just relate to the script.
And this is more functionality centric than app centric, which IMO is a good thing.
The thing with libraries is that they may spare you for reinventing the wheel each time, as there are much of the same things going on in all the scripts, like finding the parent folder, or returning a file name, or checking if a date is lesser than or greater than an other, and so on. One of the most important properties of script libraries is that they cut debugging time.
The more code reuse from libraries the better is my opinion. There were a question to about why libraries isn't used to any extent, and I can only answer for my own part. Laziness, or that entering a hfspath into a file is such a job, also because you have to open that file again.
This is areas which are in development however. It will be really easy to do so, and also to get to the source of the library, which I hope will stimulate to the use of them. Especially new scripters could leverage on using libraries, with maybe not so effective handlers, but handlers that cut development time, making scripting a nicer experience.
On 11 Aug 2010, at 13:52, Shane Stanley wrote:
> On 11/8/10 7:33 PM, "email@hidden" <email@hidden>
> wrote:
>
>> AppleScript's greatest strength is the relative ease with which it can
>> automate Apps.
>> So one could argue that the Apps are the libraries.
>>
>> For general purpose platform scripting AS is probably not a first choice.
>> Hence the demand for libraries is probably quite limited.
>
> I wouldn't argue with that. Plus stuff done in terms of app scripting
> projects often tends to be very specific and therefore less directly
> reusable, at least in the sort of stuff I do.
>
> --
> Shane Stanley <email@hidden>
>
>
>
> _______________________________________________
> 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
>
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
If an idea can survive a bureaucratic review
and be implemented it wasn't worth doing.
_______________________________________________
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