• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re. lotteries, alternatives, new dawns, etc. (was Re: Finding Filenames that contain a certain string)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re. lotteries, alternatives, new dawns, etc. (was Re: Finding Filenames that contain a certain string)


  • Subject: re. lotteries, alternatives, new dawns, etc. (was Re: Finding Filenames that contain a certain string)
  • From: has <email@hidden>
  • Date: Sat, 21 Jul 2007 18:46:20 +0100

Shane Stanley wrote:

I think you're suggesting cause where it doesn't exist. Shell scripting has
got us off the hook. Relying on Apple to make things scriptable has always
been a lottery, usually with very bad odds. Have a look around, starting
with the Finder and working down/up. Now, at least, we often have an
alternative.

I'd agree that waiting for Apple to provide enhancements to the AppleScript language is an exercise in futility, and if AppleScripters want to see any improvements here they need to roll up their sleeves and do it themselves, or pay others to do it for them.


Obviously there's no way for users to improve the core language, given that it's closed-source, but there's plenty that could be done on the library/osax/scriptable FBA front. e.g. I wrote a bunch of libraries for AppleMods that could do with some regular love and attention from the AS community. I've also provided an easy-to-use framework for others to develop scriptable FBAs in Python, a language that is not hard to learn and has scads of valuable libraries that could be wrapped for calling from AppleScript; e.g. see TextCommands on osaxen.com, which provides an indispensable collection of text manipulation commands that every AppleScript user should have.

Personally I think the AS community needs to shoulder at least some of the blame here for failing to establish a culture of formal code reuse amongst its members. Look at any popular language like Perl, Python or Ruby and they all have large, freely available collections of solid, general purpose libraries, allowing newcomers to build on top of the established work of more experienced developers. Whereas the AppleScript community seems to take a pride in constantly reinventing even the most basic of wheels time and time and time again. Good for the personal ego, perhaps, but no way to build up any kind of permanent infrastructure that'll lift a platform above its initial basement level.


I think we're all long past having any delusions that AppleScript is, or
will ever be, anything other than a minor bit-player in the Apple scheme of
things. People will continue to get excited when another Apple app gets a
handful of badly written commands added, but the reality is that we're like
beggars who are largely unseen. Hoping otherwise is just ignoring 20-odd
years of history. There is no new dawn up ahead.

This is not entirely true. I agree that the AppleScript language is, and will likely continue to be, a backwater in the OS X world; however, AppleScript != application scripting. Apple have already said that Leopard will include Cocoa-Apple event bindings that will be accessible from ObjC, Python and Ruby, so it's clear there is some sort of commitment at Apple to promoting and expanding application scripting in general.


Assuming this development manages to entice significant numbers of users to application scripting [1], this will also benefit AppleScript users as more application scripters = more motivation for application developers (including Apple themselves) to provide better scripting support in their applications.


If shell scripting lets us do things that are otherwise difficult or
impossible, terrific. Naturally, those more familiar with it will lean
towards it more often than others, just as some of us write memos in
InDesign rather than TextEdit. That's just natural. On a list where as often
as not multiple solutions are posted, it all tends to balance out.


The bottom line is that many scripters are able to do things they otherwise
couldn't because of shell scripting, and yet still integrate it into
AppleScript. To me, that's more cause for celebration than grumbling.

I would recommend to anyone who uses AppleScript as their sole language on a regular basis as their sole language that they learn a second language (I'd recommend Python, but Ruby or even bash would do) just as soon as you can get over your initial syntaxophobia. It will open your eyes to the limitations of AppleScript and expose you to all kinds of new knowledge and tools that you probably didn't even know existed before. Even if you do continue working largely or wholly in AppleScript, that learning experience will help to make you a better AppleScripter.


It's like the difference between a farmer who spends all day carrying buckets of water up a hill, and a farmer who takes the time to sit down and learn about the Archimedes screw. Until you're *at least aware* of the alternatives that exist, you've no way of telling just how much unnecessary work and pain you're creating for yourself.

Cheers,

has

[1] Personally I suspect Apple missed their best chance for success here by not going with appscript, but we'll need to wait till Leopard ships to see how good Scripting Bridge actually is and if it can manage to find any significant traction.

--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html

_______________________________________________
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
  • Follow-Ups:
    • Re: re. lotteries, alternatives, new dawns, etc. (was Re: Finding Filenames that contain a certain string)
      • From: Jon Pugh <email@hidden>
  • Prev by Date: [newbie] extract POSIX path from dropped folder
  • Next by Date: Re: [newbie] extract POSIX path from dropped folder
  • Previous by thread: Re: [newbie] extract POSIX path from dropped folder
  • Next by thread: Re: re. lotteries, alternatives, new dawns, etc. (was Re: Finding Filenames that contain a certain string)
  • Index(es):
    • Date
    • Thread