- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Part I: Introduction to Mac OS X
- Chapter 1. Mac OS X Component Architecture
- Chapter 2. Installing Mac OS X
- Chapter 3. Mac OS X Basics
- Chapter 4. The Finder: Working with Files and Applications
- Chapter 5. Running Classic Mac OS Applications
- Part II: Inside Mac OS X
- Chapter 6. Native Utilities and Applications
- Chapter 7. Internet Communications
- Chapter 8. Installing Third-Party Applications
- Part III: User-Level OS X Configuration
- Chapter 9. Network Setup
- Chapter 10. Printer and Font Management
- Chapter 11. Additional System Components
- Part IV: Introduction to BSD Applications
- Chapter 12. Introducing the BSD Subsystem
- Chapter 13. Common Unix Shell Commands: File Operations
- Part V: Advanced Command-Line Concepts
- Chapter 14. Advanced Shell Concepts and Commands
- Chapter 15. Command-Line Applications and Application Suites
- Chapter 16. Command-Line Software Installation
- Chapter 17. Troubleshooting Software Installs, and Compiling and Debugging Manually
- Chapter 18. Advanced Unix Shell Use: Configuration and Programming (Shell Scripting)
- Part VI: Server/Network Administration
- Chapter 19. X Window System Applications
- Chapter 20. Command-Line Configuration and Administration
- Chapter 21. AppleScript
- Chapter 22. Perl Scripting and SQL Connectivity
- Chapter 23. File and Resource Sharing with NetInfo
- Chapter 24. User Management and Machine Clustering
- Chapter 25. FTP Serving
- Chapter 26. Remote Access and Administration
- Chapter 27. Web Serving
- Part VII: Server Health
- Chapter 28. Web Programming
- Chapter 29. Creating a Mail Server
- Chapter 30. Accessing and Serving a Windows Network
- Chapter 31. Server Security and Advanced Network Configuration
- Chapter 32. System Maintenance
- Appendix A. Command-Line Reference
- Appendix B. Administration Reference
Script Runner
In Mac OS X 10.0 and 10.1, there is a significant change in how user interaction takes place during a script. Dialogs and other scripting additions are not recognized when running a compiled script. This results in errors when using functions such as display dialog.
Until Apple addresses this issue, there are two potential workarounds: run all scripts from within the Script Editor, or use the Script Runner to execute your AppleScripts. The Script Runner will correctly load additions and enables AppleScripts to function identically to their Mac OS 9 counterparts.
The Script Runner (path: Applications/AppleScript/Script Runner) is a very low-key application. It creates a single floating window, pictured in Figure 21.8.
Figure 21.8 The Script Runner creates a small floating window to serve as a script launch point.
Click and hold the Script Runner icon in the floating palette. A pop-up appears listing available scripts along with "Open Scripts folder" and "Script Runner help."
The Open Scripts folder opens both the ~/Library/Scripts and /Library/Scripts folders. Any compiled scripts placed in these locations will become accessible from the pop-up menu. To create submenus for categorizing scripts, just create multiple folders within the Scripts folder.
Script Runner Help displays help information for the Runner application.
Unlike normal applications, the Script Runner doesn't have a menu, a Dock icon, or any other interactive elements beyond the floating window and pop-up menu. To quit the application, click the close box in the upper-left corner of the window. This violates standard Macintosh user interface guidelines, but it's the best we have for now.
To maintain compatibility with changes to the AppleScript system that are likely to occur in the near future, it is recommended that you use the Script Runner to activate your AppleScripts.
Command-Line Tools | Next Section

Account Sign In
View your cart