AppleScript: The Definitive Guide: Scripting and Automating Your Mac

AppleScript: The Definitive Guide: Scripting and Automating Your Mac

by Matt Neuburg
AppleScript: The Definitive Guide: Scripting and Automating Your Mac

AppleScript: The Definitive Guide: Scripting and Automating Your Mac

by Matt Neuburg

eBook

$23.99  $31.99 Save 25% Current price is $23.99, Original price is $31.99. You Save 25%.

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

Mac users everywhere--even those who know nothing about programming--are discovering the value of the latest version of AppleScript, Apple's vastly improved scripting language for Mac OS X Tiger. And with this new edition of the top-selling AppleScript: The Definitive Guide, anyone, regardless of your level of experience, can learn to use AppleScript to make your Mac time more efficient and more enjoyable by automating repetitive tasks, customizing applications, and even controlling complex workflows.

Fully revised and updated--and with more and better examples than ever--AppleScript: The Definitive Guide, 2nd Edition explores AppleScript 1.10 from the ground up. You will learn how AppleScript works and how to use it in a variety of contexts: in everyday scripts to process automation, in CGI scripts for developing applications in Cocoa, or in combination with other scripting languages like Perl and Ruby.

AppleScript has shipped with every Mac since System 7 in 1991, and its ease of use and English-friendly dialect are highly appealing to most Mac fans. Novices, developers, and everyone in between who wants to know how, where, and why to use AppleScript will find AppleScript: The Definitive Guide, 2nd Edition to be the most complete source on the subject available. It's as perfect for beginners who want to write their first script as it is for experienced users who need a definitive reference close at hand.

AppleScript: The Definitive Guide, 2nd Edition begins with a relevant and useful AppleScript overview and then gets quickly to the language itself; when you have a good handle on that, you get to see AppleScript in action, and learn how to put it into action for you. An entirely new chapter shows developers how to make your Mac applications scriptable, and how to give them that Mac OS X look and feel with AppleScript Studio. Thorough appendixes deliver additional tools and resources you won't find anywhere else. Reviewed and approved by Apple, this indispensable guide carries the ADC (Apple Developer Connection) logo.


Product Details

ISBN-13: 9781449379155
Publisher: O'Reilly Media, Incorporated
Publication date: 01/04/2006
Series: Definitive Guides
Sold by: Barnes & Noble
Format: eBook
Pages: 592
File size: 5 MB

About the Author

Matt Neuburg has been programming computers since 1968. He majored in Greek at Swarthmore College, and received his PhD from Cornell University in 1981. Hopelessly hooked on computers since migrating to a Macintosh in 1990, he's written educational and utility freeware, and became an early regular contributor to the online journal TidBITS. In 1995, Matt became an editor for MacTech Magazine. He is also the author of "Frontier: The Definitive Guide" and "REALbasic: The Definitive Guide" for O'Reilly.

Table of Contents

Prefacexi
Part I.AppleScript Overview
1.Ways to Use AppleScript3
The Nature and Purpose of AppleScript3
Is This Application Scriptable?5
Calculation and Repetition6
Reduction8
Customization10
Combining Specialities10
2.Places to Use AppleScript16
Script Editor17
Scripting Environment22
Internally Scriptable Application23
Script Runner28
Automatic Location29
Application31
Unix37
3.The AppleScript Experience39
The Problem39
A Day in the Life41
Conclusions, Lessons, and Advice62
4.Basic Concepts65
Apple Event65
The Open Scripting Architecture73
Script77
Compiling and Decompiling80
Script Text File86
Applet and Droplet88
Scripting Addition89
Dictionary90
Scriptable, Recordable, Attachable92
Part II.The AppleScript Language
5.Introducing AppleScript97
A "Little Language"97
Extensibility and Its Perils98
The "English-likeness" Monster99
Object-likeness101
LISP-likeness102
The Learning Curve103
6.Syntactic Ground of Being104
Lines104
Result106
Comments109
Abbreviations and Synonyms110
Blocks111
The112
7.Variables113
Assignment and Retrieval113
Declaration and Definition of Variables115
Variable Names117
Scoping of Variables120
Script Properties131
Lifetime of Variables137
8.Handlers140
Returned Value141
Parameters143
Syntax of Defining and Calling a Handler145
Pass By Reference148
Scoping of Handlers150
Handlers as Values155
9.Script Objects159
Scoping of Script Objects160
Top-Level Entities162
Script Object's Run Handler164
Handler Calls164
Script Objects as Values166
Compiled Script Files as Script Objects172
Inheritance178
10.Objects184
Class185
Target185
Get191
It192
Me194
Properties and Elements195
Element Specifiers197
Properties of Multiple References204
Object String Specifier204
11.References206
References as Incantations207
Creating a Reference209
Identifying References210
Dereferencing a Reference211
Creating References to Local Variables215
Reference as Parameter215
12.Control218
Branching218
Looping220
Tell228
Using Terms From229
With232
Considering/Ignoring234
Errors236
Second-Level Evaluation242
13.Datatypes243
Boolean243
Integer, Real, and Number244
Date245
String247
Unicode Text249
Styled Text251
File251
Alias253
Application255
Machine255
Data256
List256
Record261
14.Coercions264
Implicit Coercion264
Explicit Coercion265
Boolean Coercions267
String, Number and Date Coercions268
File Coercions268
List Coercions269
Unit Conversions270
15.Operators272
Arithmetic Operators272
Boolean Operators274
Comparison Operators275
Containment Operators277
Concatenation Operator279
Parentheses281
Who Performs an Operation282
16.Global Properties285
Strings286
Numbers287
Miscellaneous288
17.Constants289
18.Commands292
Application Commands292
Logging Commands293
Part III.AppleScript In Action
19.Dictionaries297
Resolution of Terminology298
Resolution Difficulties301
What's in a Dictionary309
The 'aeut' Resource320
Inadequacies of the Dictionary321
20.Scripting Additions332
Pros and Cons of Scripting Additions332
Scripting Additions and Speed333
Classic Scripting Additions334
Loading Scripting Additions335
Standard Scripting Addition Commands336
21.Scriptable Applications349
Targeting Scriptable Applications349
Some Scriptable Applications353
22.Unscriptable Applications356
Getting Started with Accessibility357
GUI Scripting Examples358
23.Unix362
Do Shell Script362
Osascript365
24.Writing Applications370
Applets370
Digital Hub Scripting377
Folder Actions377
CGI Application379
AppleScript Studio382
Part IV.Appendixes
A.The 'aeut' Resource405
B.Tools and Resources424
Index431
From the B&N Reads Blog

Customer Reviews