Résumé
In this well-organized and concise reference, AppleScript programmers will find:
- Detailed coverage of AppleScript Version 1.4 and beyond on Mac OS 9 and Mac OS X.
- Complete descriptions of AppleScript language features, such as data types, flow-control statements, functions, object-oriented features (script objects and libraries), and other syntactical elements.
- Descriptions and hundreds of code samples on programming the various "scriptable" system components, such as the Finder, File Sharing, File Exchange, Network scripting, Web scripting, Apple System Profiler, the ColorSync program, and the numerous powerful language extensions called "osax" or scripting additions.
Most other AppleScript books are hopelessly out of date.AppleScript in a Nutshell covers the latest updates and improvements with practical, easy to understand tips, including:
- Using AppleScript as a tool for distributed computing, an exciting development that Apple Computer calls "program linking over IP." Programmers can now do distributed computing with Macs over TCP/IP networks, including controlling remote applications with AppleScript and calling AppleScript methods on code libraries that are located on other machines.
- Using the Sherlock find application to automate web and network searching.
- Insights on scripting new Apple technologies such as Apple Data Detectors, Folder Actions, Keychain Access, and Apple Verifier.
AppleScript in a Nutshell is a high-end handbook at a low-end price—an essential desktop reference that puts the full power of this user-friendly programming language into every AppleScript user's hands.
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
Caractéristiques techniques
PAPIER | |
Éditeur(s) | O'Reilly |
Auteur(s) | Bruce W. Perry |
Parution | 01/06/2001 |
Nb. de pages | 500 |
Format | 15 x 22,8 |
Couverture | Broché |
Poids | 630g |
Intérieur | Noir et Blanc |
EAN13 | 9781565928411 |
ISBN13 | 978-1-56592-841-1 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse