• 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: General questions from a non-Applescript coder.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: General questions from a non-Applescript coder.


  • Subject: Re: General questions from a non-Applescript coder.
  • From: Doug McNutt <email@hidden>
  • Date: Wed, 27 Apr 2005 16:13:26 -0600

At 17:05 -0400 4/27/05, Mark J. Reed wrote:
>Historically, I've programmed in zillions of languages, from machine language to ML to Smalltalk and various stops at the levels in between.

That is the worst possible place to start when learning AppleScript. The languages you already know are like mathematics with definitions and documented standards. Not so with AppleScript.

You're better off assuming that the new language you're about to learn is more like some foreign spoken tongue with all of the subtle idioms that will only make sense after you have been exposed to usage by others - this list, for instance.

You'll find that the language differs widely depending on which GUI application you're communicating with. It's a matter of dialects where simple words can mean something different or even become offensive in another neighborhood.

But. . . AppleScript, or some other form of the open scripting architecture (OSA), is the only way to script many applications and one MUST become familiar with it and learn to read the dictionaries that come with scriptable applications.

If you like UNIX-style scripting with a shell or a perl-like equivalent learn about the osascript CLI tool. It's a way to move most of your code to a familiar environment while retaining the ability to "tell" some GUI application to do something when it's the only way.

Take advantage of AppleScript's ability to save as a Finder-clickable application even if all it does is transfer control to your UNIX executable with a "do shell script" command.

Get into BBEdit worksheets. They're the closest thing available to Apple's, now unsupported, MPW which allows UNIX CLI commands to be executed directly from an editable text window. osascript commands with "here" documents will be closer to what you already know.

If an application has its own scripting language, VBA for MS Excel for instance, use it.

--

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >General questions from a non-Applescript coder. (From: Shawn Milo <email@hidden>)
 >Re: General questions from a non-Applescript coder. (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: General questions from a non-Applescript coder.
  • Next by Date: Re: tell statement changing
  • Previous by thread: Re: General questions from a non-Applescript coder.
  • Next by thread: Re: General questions from a non-Applescript coder.
  • Index(es):
    • Date
    • Thread