Books Business Design Games Hardware Internet Utilities Text Other

Appendix:

AppleScript in a Nutshell
Table of Contents

Friday, July 27, 2001


By Applelinks Contributing Editor Charles W. Moore

AppleScript in a Nutshell

Table of Contents

Preface

Part I. Introduction to AppleScript

Chapter 1. AppleScript: An Introduction
How Is AppleScript Used?
Apple Events
Using Script Runner with OS X
Using OSA Menu with OS 9
Checking Your AppleScript Version
Diving In

Chapter 2. Using Script Editor with OS 9 and OS X
Script Editor Controls/Commands
Scripting the Script Editor

Part II. AppleScript Language Reference

Chapter 3. Data Types
alias
boolean
class
constant
data
date
file specification
integer
international text
list
number
real
record
reference
RGB color
string
Styled Clipboard Text
Styled Text
text
Unicode Text
Unit of Measurement Classes
Unit of Measurement Classes

Chapter 4. Operators
&
( )
*
+
-
/ div
<
£ <=
=
>
>=
^
[a] reference to
and
as
begin[s] with
contains
does not contain
does not equal
ends with
is contained by
is not contained by
mod
not
or

Chapter 5. Reference Forms
after
back
before
beginning
first, second, third, fourth, etc.
every
every - from - to -
id
last
middle
name
some
whose

Chapter 6. Variables and Constants
Variables
Constants and Predefined Variables
all caps
all lowercase
anything
application responses
ask
bold
case
condensed
current application
date and time constants
diacriticals
expanded
expansion
false
hidden
hyphens
it
italic
me
missing value
my
no
outline
pi
plain
punctuation
result
return
shadow
small caps
space
strikethrough
subscript
superscript
tab
true
underline
version
white space
yes

Chapter 7. Flow-Control Statements
considering [but ignoring] end [considering]
continue
error
exit [repeat]
if simple statement
if [then] [else if] [else] end [if]
ignoring [but considering] end [ignoring]
repeat end [repeat]
repeat until end [repeat]
repeat while end [repeat]
repeat with {loop variable} from {integer} to {integer}[by stepVal] end [repeat]
repeat with {loop variable} in {list} end [repeat]
repeat {integer} times end [repeat]
return [return value]
tell simple statement
tell end [tell]
try [on error] [number | from | partial result | to] end[error | try]
using terms from end [using terms from]
with timeout [of] {integer} second[s] end [timeout]
with transaction [session object] end [transaction]

Chapter 8. Subroutines
Subroutines with Positional Parameters
Subroutines with Labeled Parameters
idle handler
open handler
reopen handler
quit handler
run handler

Chapter 9. Script Objects and Libraries
Script Objects
Libraries

Part III. Scripting Mac OS 9 Applications

Chapter 10. Apple Guide and Help Viewer
Apple Guide
Help Viewer

Chapter 11. Apple System Profiler
Apple System Profiler

Chapter 12. Keychain Scripting and Apple Verifier
Keychain Scripting
Apple Verifier

Chapter 13. Desktop Printer Manager
Desktop Print Manager

Chapter 14. Mac OS 9 Finder Commands
Example Finder Scripts
Finder Commands

Chapter 15. Mac OS 9 Finder Classes
Finder Classes

Chapter 16. Network Setup Scripting
Network Setup Scripting

Chapter 17. Scripting Sherlock 2
Sherlock 2

Chapter 18. URL Access Scripting
URL Access Scripting

Part IV. Scripting Mac OS 9 Control Panels and Extensions

Chapter 19. Appearance Control Panel
Appearance Control Panel

Chapter 20. Apple Data Detectors Extension
Apple Data Detectors

Chapter 21. Apple Menu Options Control Panel
Apple Menu Options

Chapter 22. Application Switcher Extension
Application Switcher

Chapter 23. ColorSync Extension
ColorSync

Chapter 24. File Exchange Control Panel
File Exchange

Chapter 25. File Sharing Control Panel
File Sharing

Chapter 26. Folder Actions Extension
Folder Actions

Chapter 27. FontSync Control Panel and Extension
FontSync Control Panel
FontSync Extension

Chapter 28. Location Manager Control Panel
Location Manager

Chapter 29. Memory and Mouse Control Panels
Memory Control Panel
Mouse Control Panel

Chapter 30. Speech Listener and SpeakableItems Extension
Speech Listener Application
SpeakableItems Extension
Embedded Speech Commands

Chapter 31. Web Sharing Control Panel

Part V. Scripting the Mac OS X System

Chapter 32. Scripting the OS X Desktop
Working with Files, Folders, Disks, and Windows in OS X

Chapter 33. Scripting Mail
Setting Up an Email Message
Exploring the Mail Application Object
Getting Information about an Email Account

Chapter 34. Executing Scripts with the Terminal App
osacompile
osalang
osascript

Chapter 35. Scripting TextEdit
TextEdit

Part VI. Appendixes

Appendix A. Standard Scripting Additions
Standard Additions
Standard Additions

Appendix B. AppleScript Resources

Index

***

Book Review: AppleScript in a Nutshell


Charles W. Moore

.

.