Muutke küpsiste eelistusi

Sams Teach Yourself AppleScript in 24 Hours [Pehme köide]

  • Formaat: Paperback / softback, 432 pages, kõrgus x laius x paksus: 186x231x25 mm, kaal: 753 g
  • Sari: Sams Teach Yourself
  • Ilmumisaeg: 15-May-2003
  • Kirjastus: Sams Publishing
  • ISBN-10: 0672325187
  • ISBN-13: 9780672325182
  • Formaat: Paperback / softback, 432 pages, kõrgus x laius x paksus: 186x231x25 mm, kaal: 753 g
  • Sari: Sams Teach Yourself
  • Ilmumisaeg: 15-May-2003
  • Kirjastus: Sams Publishing
  • ISBN-10: 0672325187
  • ISBN-13: 9780672325182
AppleScript, built into the Macintosh OS, is used by hndreds of companies and countless individuals to automate tasks, control applications, automate Web sites, and more. It's a scripting language that uses natural, English-like syntax -- much easier to code than most scripting languages.

Sams Teach Yourself AppleScript in 24 Hours offers a clearly written, well organized introduction to AppleScript. The book starts with running existing scripts, then teaches the reader to write simple scripts to create shortcuts and increase productivity on the Mac OS, then moves on to working with popular Macintosh applications with scripts.

Muu info

AppleScript, built into the Macintosh OS, is used by hndreds of companies and countless individuals to automate tasks, control applications, automate Web sites, and more. It's a scripting language that uses natural, English-like syntax -- much easier to code than most scripting languages. Sams Teach Yourself AppleScript in 24 Hours offers a clearly written, well organized introduction to AppleScript. The book starts with running existing scripts, then teaches the reader to write simple scripts to create shortcuts and increase productivity on the Mac OS, then moves on to working with popular Macintosh applications with scripts.
Introduction 1(1)
Who Should Read This Book
2(1)
How This Book Is Organized
2(1)
Conventions Used in This Book
3(2)
Part I Getting Started with AppleScript
5(76)
Introducing AppleScript
7(12)
AppleScript Success Stories
8(2)
Mac OS X
9(1)
Real Estate and Other Listings
9(1)
ShowTime
9(1)
Responding to Disk Insertions with Scripts
10(1)
Scripting Versus Point-and-Click
10(2)
Using Unused Computer Time
11(1)
Automating Complex Tasks
11(1)
Automating Routine but Simple Tasks
11(1)
Working with Speech Recognition
11(1)
Watching for Special Cases and Conditions
12(1)
What Makes AppleScript Special: Syntactical Scripting
12(1)
How AppleScript Works: Overview
13(1)
Apple Events
13(1)
Application Support
13(1)
Framework Support
14(1)
AppleScript Syntax
14(1)
Suites
14(1)
Classes
15(1)
Commands
15(1)
AppleScript Syntax for Programming
15(2)
Control Structures
15(1)
Constants
16(1)
Variables
16(1)
Interacting with Users
17(1)
Summary
17(1)
Q&A
17(1)
Workshop
18(1)
Quiz
18(1)
Quiz Answers
18(1)
Activity
18(1)
Using AppleScript
19(8)
Script Files
20(1)
Applets
21(1)
Droplets
21(1)
Toolbar Scripts
22(1)
Script Menu
22(3)
Installing the Script Menu
24(1)
Using the Script Menu
24(1)
Modifying Script Menu
24(1)
Removing Script Menu
24(1)
Scripting Additions
25(1)
Where to Get Scripts
25(1)
Summary
25(1)
Q&A
26(1)
Workshop
26(1)
Quiz
26(1)
Quiz Answers
26(1)
Activities
26(1)
Running the Scripts You Already Have
27(12)
Basics
28(3)
Scripting Help Viewer
29(1)
Using Scripts to Navigate the Web
30(1)
Launching an Application with a Script
30(1)
Finder Scripts
31(1)
Info Scripts
31(1)
Web Services
31(2)
Mail Scripts
33(2)
Navigation Scripts
35(1)
Script Editor Scripts
35(1)
Folder Action Scripts
35(2)
ColorSync and FontSync Scripts
37(1)
Summary
37(1)
Q&A
37(1)
Workshop
38(1)
Quiz
38(1)
Quiz Answers
38(1)
Activities
38(1)
Getting New Scripts from Apple and Running Them
39(12)
The iPhoto Collection
40(2)
Photo Summary
40(1)
Show Image File
41(1)
Photo to iDVD Background
41(1)
The iDVD Collection
42(2)
iDVD Companion
42(1)
Create DVD from Folders, Photos, and More
43(1)
Other Scripts
44(1)
The iTunes Collection
44(2)
Installing the iTunes Script Menu
44(1)
Looking Up Artists on eMusic
45(1)
Other Scripts
45(1)
The QuickTime Collection
46(1)
The EMBED Tag Wizard Script
46(1)
The SMIL Suite
46(1)
Other Scripts
46(1)
The Toolbar Scripts
46(2)
Customizing Your Desktop (Snapshot and Set View Options)
47(1)
Image Manipulation Scripts
47(1)
Summary
48(1)
Q&A
48(1)
Workshop
49(2)
Quiz
49(1)
Quiz Answers
49(1)
Activities
49(2)
Third-party Scripts and Applications That Simplify Your Life
51(8)
Sites for Scripts
52(3)
AppleScript Central
52(1)
AppleScript Info
52(2)
AppleScript Sourcebook
54(1)
macscripter.net
55(1)
ScriptWeb
55(1)
Utility Scripts
55(2)
iPhoto Librarian
56(1)
MacSQL
56(1)
Cronathon
56(1)
email.cgi
56(1)
acgi Dispatcher
56(1)
Summary
57(1)
Q&A
57(1)
Workshop
57(2)
Quiz
57(1)
Quiz Answers
57(1)
Activities
58(1)
Looking Behind the Scenes: How These Scripts Work
59(10)
Blocks
60(1)
Subroutines
61(2)
Using Parameters in Subroutines
61(1)
Using Prepositions with Parameters
61(2)
Handlers
63(2)
Run
63(1)
Open
64(1)
Idle
65(1)
Quit
65(1)
Recursive Processing
65(1)
Summary
66(1)
Q&A
66(1)
Workshop
66(3)
Quiz
66(1)
Quiz Answers
67(1)
Activities
67(2)
Basic Programming Concepts
69(12)
Units of Control and Definition
70(1)
Conditional Statements
71(3)
Simple Conditional Statements
72(1)
Compound Conditional Statements
72(1)
Multiple Elses
72(1)
Writing Good Conditional Statements
73(1)
Returning from a Handler
74(1)
Repetition
74(3)
repeat forever
74(1)
repeat x times
75(1)
repeat while
75(1)
repeat until
75(1)
repeat with/from/to
76(1)
repeat with/in
76(1)
Try Blocks
77(1)
Summary
78(1)
Q&A
78(1)
Workshop
79(2)
Quiz
79(1)
Quiz Answers
79(1)
Activities
79(2)
Part II Writing Scripts with Script Editor
81(76)
Introducing Script Editor
83(10)
Finding Your Way Around Script Editor
84(2)
File Menu
84(1)
Edit Menu
85(1)
Controls Menu
86(1)
Creating a Script
86(1)
Checking Syntax
86(2)
Working with Dictionaries
88(2)
Looking at the Result
90(1)
Looking at the Event Log
90(1)
Summary
90(1)
Q&A
91(1)
Workshop
91(2)
Quiz
91(1)
Quiz Answers
91(1)
Activities
92(1)
Basic AppleScript Syntax
93(14)
Tell Blocks
94(2)
Telling an Application to Do Something
94(1)
Telling an Object to Do Something
95(1)
Nesting Tell Blocks
95(1)
Single-line Tells
96(1)
Commands
96(1)
AppleScript Commands
96(1)
User-defined Commands
97(1)
Variables
97(4)
User-defined Variables
97(2)
AppleScript-defined Variables
99(2)
Expressions
101(1)
Control Statements
101(1)
Optional Words
101(1)
Script Structure
101(4)
The Basic Script
102(1)
Using Subroutines
103(2)
Summary
105(1)
Q&A
105(1)
Workshop
105(2)
Quiz
106(1)
Quiz Answers
106(1)
Activities
106(1)
Scripting the Finder
107(14)
References
108(1)
Inheritance
109(1)
Standard Suite: Terms That Most Applications Support
110(3)
close
111(1)
open
111(1)
count
112(1)
delete
112(1)
make
112(1)
Other Commands in the Finder Standard Suite
112(1)
Standard Suite Commands Not Implemented in the Finder
112(1)
Finder Basics
113(2)
Elements
114(1)
Properties
115(1)
Finder Items
115(1)
Container and Folders Suite
116(1)
Files Suite
117(1)
Window Classes Suite
117(1)
Legacy Suite
117(1)
Summary
117(1)
Q&A
118(1)
Workshop
118(3)
Quiz
118(1)
Quiz Answers
118(1)
Activities
119(2)
Scripting Mac OS X Applications from Apple
121(14)
Reading a Dictionary
122(2)
Find the application Class and Its Elements
123(1)
Look at the Element Definitions
123(1)
Repeat for Elements Contained Within Elements
124(1)
iCal
124(1)
Help Viewer
125(1)
Mail
126(1)
Address Book
127(1)
TextEdit
128(1)
DVD Player
129(1)
Internet Connect
129(1)
Print Center
129(1)
Disk Copy
130(1)
Image Capture Scripting
130(1)
Terminal
130(1)
Summary
131(1)
Q&A
132(1)
Workshop
132(3)
Quiz
132(1)
Quiz Answers
132(1)
Activities
132(3)
Scripting Mac OS X Applications from Third Parties
135(12)
Scripting America Online
136(1)
Scripting AppleWorks
137(1)
Scripting FileMaker
138(2)
Scripting Microsoft Office
140(1)
Word
140(1)
PowerPoint
141(1)
Scripting Internet Explorer
141(1)
Scripting Photoshop
142(1)
Scripting Retrospect
143(2)
Summary
145(1)
Q&A
145(1)
Workshop
146(1)
Quiz
146(1)
Quiz Answers
146(1)
Activities
146(1)
Interacting with Users
147(10)
Telling the User Something
148(2)
Asking the User Something
150(1)
Other Ways of Communicating with Users
151(1)
Speech Synthesis
151(1)
Using Other Applications for Input and Output
152(1)
Aqua Human Interface Guidelines
152(2)
Summary
154(1)
Q&A
154(1)
Workshop
154(3)
Quiz
154(1)
Quiz Answers
155(1)
Activities
155(2)
Part III Working with AppleScript Studio
157(122)
Introducing AppleScript Studio
159(22)
Getting AppleScript Studio
160(1)
What Is AppleScript Studio?
160(4)
AppleScript Studio's Components
160(2)
Looking at an AppleScript Studio Application
162(2)
Getting Started with Project Builder
164(4)
Looking at Interface Builder
168(11)
Designing the Table View
168(4)
Adding Other Interface Elements
172(2)
Working with Handlers
174(5)
Summary
179(1)
Q&A
179(1)
Workshop
180(1)
Quiz
180(1)
Quiz Answers
180(1)
Activities
180(1)
Building a Graphical AppleScript Studio Application
181(20)
Writing a Simple AppleScript Studio Application
182(5)
Create the Project
182(1)
Set Up Interface Builder
183(1)
Design the Window
183(1)
Identify Window Elements
184(3)
Write the Handler
187(1)
Run the Application
187(1)
A (Very) Little Programming Background
187(6)
Properties
189(1)
Elements
190(2)
Commands
192(1)
Events
192(1)
Summing Up the Programming Details
193(1)
Using Menus
193(5)
Implementing a Menu Command
194(1)
Factoring Your Application
195(1)
Catching Errors
196(1)
Enabling Menus
197(1)
Summary
198(1)
Q&A
198(1)
Workshop
199(2)
Quiz
199(1)
Quiz Answers
199(1)
Activities
199(2)
Writing Code for AppleScript Studio
201(20)
Working with Tab Views
202(5)
Setting Up a Tab View
203(2)
Using a Pop-up Menu to Control a Tab View
205(2)
Using Pop-up Menus and Combination (Combo) Boxes
207(3)
Using Connections to Get Pop-up Menu Values
208(1)
Using AppleScript to Get Pop-up Menu Values
209(1)
Finding Out About Events
210(3)
Nib Handler
211(1)
Action Handlers
211(1)
Drag-and-Drop Handlers
212(1)
Editing Handlers
212(1)
Key Handlers
212(1)
Mouse Handlers
212(1)
View Handler
212(1)
Special Handlers
212(1)
Using Sliders
213(1)
Using the Color Well and Image Views
214(1)
Using Progress Indicators
214(1)
Using Formatters
215(3)
Summary
218(1)
Q&A
218(1)
Workshop
219(2)
Quiz
219(1)
Quiz Answers
219(1)
Activities
219(2)
Planning and Debugging AppleScript Studio Applications
221(20)
Project Builder Preferences
222(1)
Project Builder Targets
223(8)
Summary Settings
224(1)
Settings
225(1)
Info.plist
226(2)
Document Types
228(2)
Build Phases
230(1)
Project Builder Styles
231(1)
Debugging Overview
232(1)
Who Should Debug Applications?
233(1)
When Do You Debug Applications?
233(1)
Debugging with Script Editor
233(1)
Debugging with Project Builder
233(1)
Debugging with Project Builder's Debugger
234(5)
Using Breakpoints
235(1)
A Debugging Case Study
236(2)
Debugging Strategies
238(1)
Summary
239(1)
Q&A
239(1)
Workshop
239(2)
Quiz
240(1)
Quiz Answers
240(1)
Activities
240(1)
Adding Help to AppleScript Studio
241(18)
Eliminating the Need for Help with Application Design
242(5)
Data Entry
243(3)
Command and Menu Design
246(1)
Catching Errors
247(1)
Providing Documentation
248(1)
Providing Help Tags
248(1)
Providing Button-driven Help
249(5)
Adding an Image to Your Project
249(3)
Implementing the Button
252(2)
Interacting with Help Viewer
254(1)
Summary
255(1)
Q&A
256(1)
Workshop
256(3)
Quiz
257(1)
Quiz Answers
257(1)
Activities
257(2)
Using Documents and Data Sources with AppleScript Studio
259(20)
Working with Table and Outline Views
260(2)
Working with Data Sources
262(6)
Data Source Basics
262(1)
Creating Data Sources
263(1)
Adding Rows to Data Sources
264(1)
Populating New Rows with Data
265(2)
Bulk Additions to Data Sources
267(1)
Extracting Data from Data Sources
267(1)
Exploring the AppleScript Document Template
268(4)
Working with Documents: High-level Approach
272(2)
Storing Data to Disk
273(1)
Retrieving Data from Disk
274(1)
Working with Files: Low-level Approach
274(2)
Storing Data to a File
275(1)
Retrieving Data from a File
275(1)
Summary
276(1)
Q&A
276(1)
Workshop
277(2)
Quiz
277(1)
Quiz Answers
277(1)
Activities
277(2)
Part IV Advanced Scripting
279(82)
Advanced AppleScript Syntax
281(16)
Script Objects
282(10)
What Is a Script Object?
282(1)
Script Objects as Instances
283(4)
Inherited Script Objects
287(4)
Design Considerations
291(1)
GUI Scripting
292(3)
Summary
295(1)
Q&A
295(1)
Workshop
295(2)
Quiz
296(1)
Quiz Answers
296(1)
Activities
296(1)
Creating AppleScripts to Control Multiple Applications
297(14)
Basic Script Design
298(2)
getData
298(1)
createDocument
299(1)
fillDocument
299(1)
Extracting Data from Address Book and Placing It in Text Edit
300(2)
getData
300(1)
createDocument
300(1)
fillDocument
300(2)
Extracting Data from FileMaker and Placing It in Text Edit
302(1)
getData
302(1)
createDocument
303(1)
fillDocument
303(1)
Extracting Data from Address Book and Placing It in InDesign
303(3)
getData
303(1)
createDocument
304(1)
fillDocument
305(1)
Extracting Data from FileMaker and Placing It in InDesign
306(1)
getData
306(1)
createDocument
306(1)
fillDocument
306(1)
Creating Dynamic Pages with InDesign
306(2)
getData
307(1)
createDocument
307(1)
fillDocument
307(1)
Summary
308(1)
Q&A
309(1)
Workshop
309(2)
Quiz
309(1)
Quiz Answers
310(1)
Activities
310(1)
Using AppleScript Across a Network
311(18)
Mounting Remote Disks
312(1)
Mounting afp Volumes
312(1)
Using the Server Name
313(1)
Ejecting Disks
313(1)
How AppleScript Works Across a Network
313(1)
What You Need to Do on the Client Mac
314(1)
What You Need to Do on the Server Mac
315(3)
Allowing Remote Connections for File Sharing
316(1)
Allowing Remote Connections for Apple Events
317(1)
Setting Up User Accounts for Remote Access
317(1)
Using AppleScript to Process CGI Requests
318(3)
Creating the HTML
319(1)
Modifying the Script from Apple
320(1)
Using Web Services
321(4)
XML-RPC
322(1)
SOAP
322(3)
Using Web Services with Script Editor
325(1)
Using Web Services with AppleScript Studio
326(1)
Summary
327(1)
Q&A
327(1)
Workshop
328(1)
Quiz
328(1)
Quiz Answers
328(1)
Activities
328(1)
Beyond AppleScript: Using Services
329(12)
A Services Overview
330(2)
How Services Work
332(1)
Processor Services
332(1)
Provider Services
332(1)
Combination Services
332(1)
Under the Hood
333(1)
Enabling Services with AppleScript Studio
333(4)
Why Use Services with AppleScript Studio?
337(1)
Services from Script Editor
337(1)
Make New AppleScript
337(1)
Get Result of AppleScript
337(1)
Run As AppleScript
338(1)
Summary
338(1)
Q&A
338(1)
Workshop
338(3)
Quiz
339(1)
Quiz Answers
339(1)
Activities
339(2)
Beyond AppleScript: Shell Scripts, Perl, and Other Scripting Languages
341(20)
Using Terminal
342(7)
What Commands Are Available?
343(1)
Using the Command Line
344(1)
The Format of Commands
344(1)
Using Files for Input, Output, and Errors
345(1)
Using Files for Commands
346(1)
Working with Files in Terminal
346(1)
Listing a Directory and Displaying a File
347(2)
Changing Permissions
349(1)
Using sudo
349(1)
Running AppleScript from Terminal
349(3)
Running a Script from Terminal
350(1)
Running AppleScript Commands from Terminal
351(1)
Running AppleScript As Commands from Applications
352(1)
Automatically Running Scripts
353(3)
cron
353(1)
periodic
354(2)
Other Scripting Languages
356(1)
Perl
356(1)
Ruby
357(1)
Python
357(1)
Summary
357(1)
Q&A
358(1)
Workshop
358(3)
Quiz
358(1)
Quiz Answers
358(1)
Activities
359(2)
Part V Appendixes
361(20)
Appendix A Constants and Predefined Variables
363(4)
Appendix B Operators
367(4)
Arithmetic Operators
368(1)
Boolean Operators
368(1)
Containment Operators
368(1)
Equality Operators
369(1)
Comparison Operators
370(1)
Appendix C Third-party Script Editors
371(10)
Smile
372(2)
Script Debugger
374(3)
PreFab UI Browser
377(4)
Glossary 381(4)
Index 385


Jesse Feiler is the author of a number of Mac OS X books including Mac OS X Jaguar: The Complete Reference; Mac OS X Developer's Guide; and Making Movies, Photos, Music, and DVDs on Your Mac. He is also the author of Building WebObjects 5 Applications, as well as many books on the Web-based enterprise (such as Database-Driven Web Sites and Managing the Web-Based Enterprise), the Y2K problem, home offices, databases, and FileMaker. He has written numerous white papers for Cutter Consortium. His books on OpenDoc, Cyberdog, Apple Guide, and Rhapsody are now collector's items.

He has worked as a developer and manager for companies such as the Federal Reserve Bank of New York (monetary policy and bank supervision), Prodigy (early Web browser), Apple (information systems), New York State Department of Health (rabies and lead poisoning), The Johnson Company (office management), and Young & Rubicam (media planning and new product development).

His interests in new forms of technical training have led him to MediaSchool (http://www.mediaschool.com), for which he has authored several Mac OS X courses available over the Internet, as well as to Geek Cruises' Mac Mania cruise to Alaska. He is also the first author of a technical book to be published in both a paper version and as an e-book.

His Web site, http://www.philmontmill.com, provides additional information as do his blog pages at http://www.pickwickpixels.com.

Active in the community, he is past president of the Mid-Hudson Library System, chair of the Philmont Comprehensive Plan Board, founder of the Philmont Main Street Committee, and treasurer of the HB Playwrights Foundation. He is a regular on WAMC's Roundtable program.

He lives 100 miles north of New York City in the village of Philmont with a rescued greyhound and a cat. His research into Apple's iLife application has earned him the sobriquet "The Digital Scourge of Philmont."