TweetFollow Us on Twitter

AppleScript Scorecard

Volume Number: 14 (1998)
Issue Number: 2
Column Tag: Scripting

The AppleScript Scorecard Guidelines

by Cal Simone and Bill Cheeseman

Is your application truly scriptable? These guidelines may help you find the answer

For users writing scripts in AppleScript, the number one challenge is the lack of intuitiveness in scripting implementations and consistency when moving among scriptable applications of different types. To aid potential users of scriptable applications in determining the suitability of particular products for their scripting scenarios and, more importantly, to promote these characteristics among developers of scriptable applications, a set of guidelines has been developed, in the form of an AppleScript "Scorecard".

By the time you read this, the Catalog of Scriptable Products should be available on the Web, tentatively at http://www.mainevent.com/scorecard/. The Catalog is a comprehensive directory of scriptable applications, and includes reviews and ratings. The guidelines put forth in this article were developed to form the basis for the reviews and ratings found in the Catalog.

Although the guidelines were developed primarily as an aid for users, they are offered here so that, as the developer of a scriptable product, you can see, in broad terms, what makes up an application that delivers the power of user scripting into the hands of users. Note that, at the time of writing this, we were close to completion, but the final point distribution had not been frozen.

Even if you don't submit your application for a rating, following the criteria of this scoring system will guide you to making your application more easily scripted and more consistent with other well-designed object model-based applications.

The Guidelines

These Guideline are Copyright 1997-1998, Cal Simone and Bill Cheeseman. Printed courtesy of MacTech Magazine, April 1998. The Guidelines may be freely used and distributed, provided that they are copied or distributed in complete form, without alteration, and provided this notice is included.

To promote full AppleScript support in the widest range of products, an application is rated in the AppleScript Scorecard in part for the full and proper implementation of specific scripting features, such as the object model and recordability. To promote the highest quality, an application is also rated on a more qualitative assessment of the design, completeness, transparency, stability and documentation of its AppleScript implementation. In the first phase of rating an application, a range of points is awarded for the presence of specific features, taking into account the extent to which each feature is implemented and its conformity to Apple standards and conventions. In the second phase, additional points are awarded on a sliding scale for specific overall qualities of the scripting implementation.

The AppleScript Scorecard rates an application's support for AppleScript on a scale of 0 to 100. The final score is converted to a scale of one to five "scripts", with half-scripts (1-10 = 1/2 script, 11-20 = 1 script, etc.). The "scripts" score is the primary rating for public distribution, but the points score can be published in parentheses (after converting it to a scale of 0.0 to 10.0 with one decimal place). An example: "3-1/2 scripts (7.2)".

An application is not considered scriptable, and it is not rated, if it has no dictionary or terminology ('aete') resource, or if it has a dictionary that supports only the Required Suite (the run, open, print and quit Apple events) and the "do script" event. Its Finder "scriptable" property may be true because it does respond to the Required Suite, but this by itself does not reach the threshold necessary to be rated.

To be considered for rating, therefore, an application must implement a meaningful and reasonably useful set of verbs in addition to those in the Required Suite (run, open, print and quit), although not necessarily in the form of additional, named suites. Even a small number of supported commands suffices, as long as they enable a scripter to take advantage of some significant and useful functionality of the application. The "do script" event, without more, does not qualify (because this is a rating of the application's AppleScript features, not of a proprietary internal scripting system.)

Phase 1 -- Scripting Features Supported

Points are awarded in Phase 1 for the presence of the specific AppleScript features described below. A range of points may be awarded for the presence of each feature to take into account the extent of its implementation and its conformity to Apple standards and conventions, but Phase 1 does not otherwise rate qualitative aspects of the application's AppleScript support.

Implementation of any of these AppleScript features in conformity to its description here merits awarding the maximum number of points for that feature. Points should be deducted from the maximum for failure to implement specific aspects of a feature where indicated. Points should also be subtracted for limiting a scripting feature such as the object model to a narrow subset of an application's functionality; the penalty should be roughly proportional to the fraction of the application's functionality that is not covered by the scripting implementation. The maximum score for complete implementation of all possible scripting features is 40 points.

Object Model Support -- supports the Apple event object model -- 0 to 25 points

The application supports the object model. It includes at least the essential verbs in the Core, or Standard, Suite ("make", "get" and "set," at a minimum). It also implements a meaningful set of objects that can contain other objects and that have properties. The elements contained in objects have a variety of reference forms (e.g., by index, by name, by unique ID) suitable to their intended use. Its supported commands, including new verbs devised for the application, can operate on various objects and properties in object model fashion. For example, instead of providing commands that are verb-noun hybrids like "GetColor", a graphics application might support objects of several classes, including "picture," which can have any of several properties, including "color," and commands that can operate flexibly on any of those objects and properties to allow a scripter to create complex statements such as "make new picture with properties {color:red}", "get the color of the first picture" and "set the color of picture 3 to red." The objects supported by an application must correspond to all of the conceptual structures of the application (windows, pictures and so on; not its internal programmatic objects). 5 points should be withheld if the application does not support the filter reference form ("whose" clauses).

Recordable -- supports recording -- 0 to 5 points

The application automatically generates the text of valid AppleScript statements when actions are recorded by a script editor. To receive the full 5 points, the generated script must be executable without editing when run under the same conditions under which it was recorded, and its statements should be in general form (for example, they should not refer to objects by unique id).

Attachable -- supports a "Scripts" menu -- 0 to 5 points

The application has a "Scripts" menu which lists AppleScripts written by the user and allows them to be run from the menu bar. An application typically installs the scripts in the Scripts menu when the user places them in a folder within the application's folder. Withhold 1 point if the Scripts menu does not support hierarchical menus (scripts installed in subfolders of the Scripts folder), and withhold 1 point if the Scripts menu is not updated "on the fly" when a new script is placed in the Scripts folder. Withhold 2 points if the menu has a name other than "Scripts" or its synonym in non-English systems.

Embeddable -- supports embedding of scripts in the user interface generally -- 0 to 5 points

The application provides a means to integrate user-written AppleScripts into the user interface in any of a variety of ways in addition to or instead of installing them in a "Scripts" menu. For example, scripts can be executed by clicking on buttons on a tool palette, or scripts can be run as background agents in response to events occurring in the application such as the launching of the application, the opening or closing of a window or the receipt of e-mail. The specific user interface and the manner in which these scripts are stored is not specified and is not relevant to the score. To receive the full 5 points, the manner in which embedded scripts are made available to the user should be creative, consistent with the user interface generally and easy to use.

Phase 2 -- Quality of Scripting Implementation

In addition to the points awarded in Phase 1 for specific scripting features, additional points are awarded in Phase 2 on the basis of the following qualitative assessments of specific aspects of an application's AppleScript support. In general, these categories rate the degree to which an application's AppleScript support forms a consistent and useful user interface in its own right.

An award of 0 points in any one category means that the implementation is abysmal in that respect; 2 or 3 points, that it is barely useful; 6 points, that it is average and therefore acceptable; 9 or 10 points, that it is very good; and 12 points, that it is nearly perfect. In general, a conservative approach is taken so that room will be left at the extreme ends of the scale to distinguish the worst and the best implementations. An average score is not bad, and the scores of most applications should cluster around 6. A score of 4 or 5 points will not be uncommon for slightly below average implementations, and 7 or 8 points should be considered appropriate for good implementations. The maximum score for quality is 60 points. To be awarded the full score, an application's AppleScript support should achieve all of the desired qualities in each category described here.

Design -- fidelity to the application's structure and function -- 0 to 12 points

The Application's commands, objects and properties, and the containment hierarchy and relationship of objects to one another, flow naturally from its subject matter and function instead of rigidly and slavishly mimicking its menu commands and dialogs. The richness of the application is reflected in a relatively large number of objects, or nouns, and a relatively small number of events, or verbs, that act upon them. Commands and objects from established suites, such as the Text Suite, are implemented faithfully if the application is one for which the suite is appropriate. For an application in an area that has no established suites, its commands and objects reflect an equally appropriate fidelity to the structure and function of the application. Consistency with good scripting implementations in the run of scriptable applications in a particular field is closely observed or, if a new and different approach is taken, it is creative, imaginative and, above all, natural and intuitive -- and still in keeping with the "look and feel" of standard AppleScript. Verbs and nouns that go beyond the standard features of established and well-designed suites must extend the language in a consistent and useful manner.

Completeness -- depth, breadth and thoroughness of scriptability -- 0 to 12 points

The application implements a large number of commands, a wide array of objects having a deep containment structure, and a rich and extensive set of properties, exposing the application's full complexity and overall functionality through its scripting interface. The AppleScript implementation is thorough, detailed and complete, making all appropriate functions of the application available to the scripter.

Transparency -- resemblance to plain English words and syntax -- 0 to 12 points

AppleScripts written with the application's dictionary are made up of simple English sentences. Common words in everyday use are employed in a familiar way to describe commands, objects and properties. The application's terminology and syntax are natural and intuitive, not awkward and obscure. A traditional computer programmer would think that an AppleScript statement written using the application's dictionary was a conceptual description of a script, not its executable code. A nonprogrammer would have a good chance of getting an AppleScript statement right the first time without looking at the manual, and scripters experienced with the application would have little difficulty remembering how to script it.

Stability -- absence of bugs -- 0 to 12 points

The application's AppleScript implementation is bug-free, and it works according to specification.

Documentation -- documentation and examples are provided -- 0 to 12 points

Instructions for most or all of the application's scripting features are provided, whether in print or on disk. The documentation is clearly written, well organized and thorough. A large number of useful examples are provided. Apple Guide help (or another help facility available within the application) covers the topic of scripting. The scripting dictionary ('aete' resource) within the application has comments sufficient to remind a user familiar with the application how to use its commands and objects without the need to resort to the external documentation.

Getting Your Product Rated

Send your application (including documentation), in a StuffIt archive, to review@script.org. Submitting to this address will cause the terms in your vocabulary to be added to the databases (both inside and outside of Apple) that are used to analyze and maintain the AppleScript language. This also submits your product for review in the Catalog of Scriptable Products. A submission form is also available in the Catalog's web area, tentatively http://www.mainevent.com/scorecard/. If your application is large, has printed manuals, or is packaged in a box, instructions can be found on the submission form for shipping your product, manuals, or other materials for review.

More Resources for Implementing Scriptability

A roadmap for achieving a thoughtfully designed and well-executed scripting implementation can be found in "According To Script: Steps to Scriptablility" in develop issue 24.

Many of the style guidelines, conventions, tips, and tricks (including the reasons for implementing the object model) are offered in "Designing a Scripting Implementation" in develop issue 21, and the rest of the "According to Script" series, issues 22-26 and 29.

Details of the Apple Event Manager and OSA (Open Scripting Architecture) API are described in Inside Macintosh: Interapplication Communication.


Cal Simone, cal@script.org, champion of AppleScript, is the President of Main Event Software mainevent@his.com and the designer of the Scripter authoring and development environment for AppleScript. In the first half of 1997, Cal spearheaded a 5-month effort to rescue AppleScript from the chopping block during Apple's "technology evaluation" (also known as the "spring cleaning") and to convince Apple's top management to commit to AppleScript in Rhapsody.

Bill Cheeseman, cheeseb@mediaone.net is a lawyer in Massachusetts, and he maintains The AppleScript SourceBook site at http://oasis.bellevue.k12.wa.us/cheeseb/index.html. A true-life legal experience of his is the subject of the best-selling book "A Civil Action," and it is being made into a Hollywood movie, starring John Travolta, to be released in late 1998. Bill has been programming Apple computers as a hobby since 1977.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

WhatsApp 0.3.416 - Desktop client for Wh...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
Skype 8.28.0.41 - Voice-over-internet ph...
Skype allows you to talk to friends, family and co-workers across the Internet without the inconvenience of long distance telephone charges. Using peer-to-peer data transmission technology, Skype... Read more
DxO PhotoLab 1.2.1.79 - Image enhancemen...
DxO PhotoLab (was DxO Optics Pro) provides a complete set of smart assisted corrections that you can manually fine-tune at any time. Take control on every aspect of your photos: effectively remove... Read more
ForkLift 3.2.3 - Powerful file manager:...
ForkLift is a powerful file manager and ferociously fast FTP client clothed in a clean and versatile UI that offers the combination of absolute simplicity and raw power expected from a well-executed... Read more
Bartender 3.0.47 - Organize your menu-ba...
Bartender lets you organize your menu-bar apps by hiding them, rearranging them, or moving them to Bartender's Bar. You can display the full menu bar, set options to have menu-bar items show in the... Read more
VOX 3.3.1 - Music player that supports m...
VOX just sounds better! The beauty is in its simplicity, yet behind the minimal exterior lies a powerful music player with a ton of features and support for all audio formats you should ever need.... Read more
Microsoft OneNote 16.16 - Free digital n...
OneNote is your very own digital notebook. With OneNote, you can capture that flash of genius, that moment of inspiration, or that list of errands that's too important to forget. Whether you're at... Read more
WiFiSpoof 3.3 - Change your WiFi MAC add...
WiFiSpoof quickly and easily allows you to change your WiFi MAC address via hot-key or the system menu bar. Version 3.3: It is now possible to create global rules for unknown networks A new column... Read more
NetShade 7.2 - Browse privately using an...
NetShade is an anonymous proxy and VPN app+service for Mac. Unblock your Internet through NetShade's high-speed proxy and VPN servers spanning seven countries. NetShade masks your IP address as you... Read more
Fantastical 2.5.2 - Create calendar even...
Fantastical is the Mac calendar you'll actually enjoy using. Creating an event with Fantastical is quick, easy, and fun: Open Fantastical with a single click or keystroke Type in your event details... Read more

Latest Forum Discussions

See All

It's up to you to decide which of t...
Thursday has slipped up on us once again, and here at 148Apps that means it's time to start the game of the week process all over again. We've picked five of the best games that have come out over the last seven days, and it's up to you which of... | Read more »
REACH classic puzzles its way onto mobil...
Match-3 puzzler REACH classic proved a smash hit during its Canadian soft launch, and now developer B2tGame has brought it to mobile devices worldwide so you can see what all the fuss is about. After topping the App Store charts for the puzzle,... | Read more »
The best female characters in mobile gam...
In the world of mobile gaming, truly well-made games can often be something of a rarity. Well-made games that feature female protagonists are even rarer, and while many games give you the option to choose between a male or female avatar, it's not... | Read more »
Knights Chronicle guide - Everything you...
The latest update to Knights Chronicle brought us some balance changes and interesting new characters, but perhaps the most interesting addition of all is the game’s new mode. Guild Battle allows teams of players to test their collective strength... | Read more »
This week's game of the week is the...
Well it was a tight one this week, but after a count, a recount, and a harried phone call with the game of the week administration in Strasbourg, we can now reveal that the winner of this week's game of the week award is midcore stealth banger,... | Read more »
How to get the highest score in Tomb of...
Tomb of the Mask is a super-quick arcade dasher with remarkably simple swipe controls. It's also fiendishly tough, and if it gets your claws into you there's a very good chance that about every third second of your life is going to be consumed by... | Read more »
Which mobile games let you experience li...
There are plenty of what you might call standard experiences on the App Store. You know the sort of game I'm talking about. A man wanders around hurting people in order to complete some task, quest, or mission. It's the way video games have been... | Read more »
Which of these 5 mobile games deserves t...
Time certainly flies when you're having fun, and if you spend all of your life playing the best mobile games in the world, you best believe that time's flying like a bullet from a really big gun. Basically what I'm saying is that it's Thursday... | Read more »
Knights Chronicle guide - Everything you...
It seems like every two weeks, we can expect some new and exciting things to come to Knights Chronicle. In the last update, there were some nice quality of life features added to the game, but aside from a couple new heroes, not anything huge to... | Read more »
Numbers and monsters RPG Math and Sorcer...
We've counted up all the votes, sent them off to the court of arbitration in Strasbourg and had them vetted by an independent panel of retired judges and this guy we know who said he was real honest. I tell you all of this so when I announce the... | Read more »

Price Scanner via MacPrices.net

Education customers can save up to $400 on a...
Purchase a new Mac or iPad Pro using Apple’s Education discount, and take up to $400 off MSRP. All teachers, students, and staff of any educational institution with a .edu email address qualify for... Read more
Education customers can save up to $400 on a...
Purchase a new Mac or iPad Pro using Apple’s Education discount, and take up to $400 off MSRP. All teachers, students, and staff of any educational institution with a .edu email address qualify for... Read more
Apple restocks clearance 2017 15″ MacBook Pro...
Apple has Certified Refurbished 2017 15″ Touch Bar MacBook Pros available starting at $1909. Apple’s refurbished prices are the lowest available for each model from any reseller. An standard Apple... Read more
7.9″ 128GB iPad mini 4 on sale for $100 off M...
Jet.com has Space Gray 128GB iPad mini 4 models on sale for $299.99 or 25% off MSRP: – 128GB iPad mini 4: $299.99, $100 off Shipping is free on all orders over $35. Walmart has all colors of the... Read more
10″ 64GB iPad Pro available for $598 for Sams...
Sams Club has 10.5″ 64GB Apple WiFi iPad Pros on sale for $51 off MSRP. Choose free shipping or free local store pickup (if available). Sale prices for online orders only, in-store prices may vary... Read more
Adorama matches B&H, offers new 2018 Touc...
Adorama is now offering new 2018 MacBook Pros for up to $150 off MSRP. 15″ MacBook Pros are on sale for $150 off Apple’s price and 13″ MacBook Pros for $100 off. Both Space Gray and Silver models are... Read more
Apple offers refurbished 2016 13″ Touch Bar M...
Apple has Certified Refurbished 2016 13″ Touch Bar MacBook Pros available today starting at $1349, or up to $480 off original MSRP. An Apple one-year warranty is included with each model, and... Read more
Brand New Macs Found Susceptible to Being Hac...
NEWS: 08.13.18- Apple computers are known to be very secure compared to its counterparts and were generally free of viruses and malware until recent years due to its rise in popularity among... Read more
New 2018 MacBook Pro sale! B&H offer 15″...
B&H Photo has new 2018 MacBook Pros on sale this week for $150 off MSRP. They’re offering 15″ MacBook Pros for $150 off Apple’s price and 13″ MacBook Pros for $100 off. Both Space Gray and Silver... Read more
13″ 2.3GHz non-Touch Bar MacBook Pros on sale...
B&H Photo has new 2017 13″ 2.3GHz non-Touch Bar MacBook Pros on sale for $100-$200 off MSRP this week. B&H charges sales tax in NY & NJ only, and shipping is free. – 13-inch 2.3GHz/128GB... Read more

Jobs Board

*Apple* Mobile Master - Best Buy (United Sta...
**628973BR** **Job Title:** Apple Mobile Master **Location Number:** 001532-Burlington-Store **Job Description:** **What does a Best Buy Apple Mobile Master Read more
*Apple* Genius - Technical Customer Service...
Job Description: Job Summary As a Genius at the Apple Store, you maintain customers' trust in Apple as the skilled technical customer service expert, Read more
Senior iCloud Software Engineer - *Apple* P...
Imagine what you could do here. At Apple , new ideas have a way of becoming great products, services, and customer experiences very quickly. Bring passion and Read more
Best Buy *Apple* Computing Master - Best Bu...
**628125BR** **Job Title:** Best Buy Apple Computing Master **Location Number:** 002512-Columbus-Store **Job Description:** The Core Apple Computing Master is Read more
*Apple* Genius - Technical Customer Service...
Job Description: Job Summary As a Genius at the Apple Store, you maintain customers' trust in Apple as the skilled technical customer service expert, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.