AppleScript Language Guide

Overview

This book is an essential reference for anyone using AppleScript to modify existing scripts or write new ones. It provides many sample scripts and discusses advanced topics such as writing command handlers for script applications, the scope of script variables and properties declared at different levels in a script, and inheritance and delegation among script objects.

Apple's definitive guide to the powerful AppleScript scripting language, thisbook provides essential...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (16) from $1.99   
  • New (1) from $80.00   
  • Used (15) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$80.00
Seller since 2014

Feedback rating:

(148)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

This book is an essential reference for anyone using AppleScript to modify existing scripts or write new ones. It provides many sample scripts and discusses advanced topics such as writing command handlers for script applications, the scope of script variables and properties declared at different levels in a script, and inheritance and delegation among script objects.

Apple's definitive guide to the powerful AppleScript scripting language, thisbook provides essential information for Macintosh power users and programmerswho want to use AppleScript to write new scripts, modify existing scripts, orwrite scriptable applications.

Read More Show Less

Editorial Reviews

Booknews
A description and reference for the English dialect of the AppleScript scripting language. Helps the reader modify existing scripts or write new ones and contains useful advice for programmers. Previous experience with another scripting language (such as HyperTalk) is helpful. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780201407358
  • Publisher: Addison-Wesley
  • Publication date: 2/28/1994
  • Edition number: 1
  • Pages: 416
  • Product dimensions: 7.52 (w) x 9.04 (h) x 0.88 (d)

Table of Contents


Figures and Tables ..... 13

Chapter 1 Introduction ..... 17

Chapter 2 Overview of AppleScript ..... 19
Conventions Used in This Guide ..... 20
What Is AppleScript? ..... 21
How AppleScript Works ..... 29
Statements ..... 31
Commands and Objects ..... 32
Dictionaries ..... 34
Values and Constants ..... 36
Expressions ..... 37
Script Objects ..... 39
Scripting Additions ..... 40
Dialects ..... 40
Other Features and Language Elements ..... 41
Abbreviations ..... 46
Compiling Scripts With the Script Editor ..... 47
Debugging Scripts ..... 47

Chapter 3 Values and Constants ..... 51
Using Value Class Definitions ..... 52
Common Value Class Definitions ..... 56
Unicode Text and International Text ..... 87
Unit Type Value Classes ..... 91
Other Value Classes ..... 94
Coercing Values ..... 97
Constants ..... 100

Chapter 4 Commands ..... 109
Types of Commands ..... 110
Using Command Definitions ..... 115
Using Parameters ..... 118
Using Results ..... 121
Double Angle Brackets in Results and Scripts ..... 123
Command Definitions ..... 127

Chapter 5 Objects and References ..... 161
Object Class Definitions ..... 162
References ..... 165
Reference Forms ..... 169
Using the Filter Reference Form ..... 187
References to Files and Applications ..... 190

Chapter 6 Expressions ..... 199
Results of Expressions ..... 200
Variables ..... 200
Script Properties ..... 208
AppleScript Properties ..... 210
Reference Expressions ..... 212
Operations ..... 213
Contains, Is Contained By ..... 227
Concatenation 229 .....
Operator Precedence ..... 231
Date-Time Arithmetic ..... 233
Working With Dates at Century Boundaries ..... 235

Chapter 7 Control Statements ..... 237
Characteristics of Control Statements ..... 238
Debugging Control Statements ..... 239
Tell Statements ..... 240
If Statements ..... 245
Repeat Statements ..... 249
Try Statements ..... 259
Considering and Ignoring Statements ..... 268
With Timeout Statements ..... 272
With Transaction Statements ..... 275

Chapter 8 Handlers ..... 279
Script Applications ..... 279
About Subroutines ..... 280
Defining and Calling Subroutines ..... 289
Subroutines With Labeled Parameters ..... 290
Subroutines With Positional Parameters ..... 296
Command Handlers ..... 300
Scope of Script Variables and Properties ..... 311
Scope of Properties and Variables Declared at the Top Level of a script ..... 313
Scope of Properties and Variables Declared in a Script Object ..... 316
Scope of Variables Declared in a Handler ..... 321

Chapter 9 Script Objects ..... 325
About Script Objects ..... 326
Defining Script Objects ..... 327
Sending Commands to Script Objects ..... 328
Initializing Script Objects ..... 329
Inheritance and Delegation ..... 331
Using the Copy and Set Commands With Script Objects ..... 342

Appendix A The Language at a Glance ..... 349
Common Scripting Tasks ..... 350
Constants ..... 354
Predefined Variables ..... 358
Commands ..... 359
Coercions ..... 363
References ..... 365
Operators ..... 367
Control Statements ..... 373
Handlers ..... 376
Script Objects ..... 378
Variable and Property Assignments and Declarations ..... 378
Placeholders ..... 380
Error Numbers and Error Messages ..... 384

Appendix B Document Revision History ..... 391
Glossary ..... 395
Index ..... 405
Read More Show Less

First Chapter

Chapter One

Introduction

AppleScript is a scripting system that allows you to directly control Macintosh applications, including the Mac OS itself. Instead of using a mouse, keyboard, or other input device to manipulate menus, buttons, and other interface items, you can create sets of written instructions-known as scripts-to automate repetitive tasks, customize applications, and even control complex workflows.

This document is a complete guide to the AppleScript language. It is intended for use with AppleScript version 1.3.4 or later and Mac OS 8.5.1 or later, although some descriptions and examples may work with earlier versions.

This version of the AppleScript Language Guide has been revised to cover new features in AppleScript, to include examples from the Mac OS and the Finder, to improve formatting for online viewing, and to correct errors. For a detailed listing of the changes, see "Document Revision History" (page 391).

This guide should be useful to anyone who wants to write new AppleScript scripts or modify existing scripts. If you are new to AppleScript, however, you might want to start by reading the AppleScript section of the Mac OS Help Center, or by reviewing the introductory materials at the AppleScript website:

http://www.apple.com/applescript/

You can also find introductory books on AppleScript at many bookstores and online sites. Macintosh software developers who want to create scriptable applications should refer to Inside Macintosh: Interapplication Communication, and to related information available at the Apple Developer website:

http://www.apple.com/developer/

This guide describes the AppleScript language in thefollowing chapters:

  • "Overview of AppleScript" (page 19) introduces AppleScript and its capabilities and provides an overview of the elements of the AppleScript language. Introduction
  • "Values and Constants" (page 51) describes AppleScript's value classes, predefined constants, and coercions for converting between value classes.
  • "Commands" (page 109) describes the commands available in AppleScript.
  • "Objects and References" (page 161) describes objects and their characteristics and explains how to refer to. objects in scripts.
  • "Expressions" (page 199) describes AppleScript expressions, the operators they use, and how they're evaluated.
  • "Control Statements" (page 237) describes statements that control when and how other statements are executed.
  • "Handlers" (page 279) describes subroutines, command handlers, error handlers, and the scope of variables and properties in handlers and elsewhere in a script.
  • "Script Objects" (page 325) describes how to define and use script objects.
  • "The Language at a Glance" (page 349) provides a quick overview of the AppleScript language. It includes a table with links to examples of common scripting tasks.
  • "Document Revision History" (page 391) provides a history of changes to this document.

Most sample scripts in this guide demonstrate scriptable features of the Finder, the Mac OS, or applications distributed with the Mac OS, such as the Apple System Profiler. Some examples use AppleWorks, an application suite available from Apple Computer, Inc.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)