Version: 1.2

Posted: 2006-07-31

Build Requirements: Xcode

Runtime Requirements: Mac OS X 10.3

View Source Code:

Download Sample (“AppleScriptRunner.zip”, 78.4K)
Download Sample (“AppleScriptRunner.dmg”, 134.6K)



Description

Embedding and executing AppleScripts within your application bundle allows you to quickly add functionality to your application without changing any code which otherwise becomes very complicated.

AppleScriptRunner contains a folder within its application bundle, "AppleScripts" which contains a number of customizable AppleScripts. The selected AppleScript is executed while passing it a Text parameter. How do you send email from your application? AppleScriptRunner allows you to send email by running the enclosed "Mail" AppleScript. How do you add Text-To-Speech? Just call the enclosed "Speak" AppleScript.

By packaging up functionality into AppleScripts called by an application it could allow users to create their own customizable alerts/events, extend the behavior of the main application, package functionality into components, and more.

Document Revision History

Date Notes
2006-07-31Updated to produce a universal binary. No code changes were required.
2005-01-24Fixed a bug in which a resource file was being closed before DetachResource was called on the 'scpt' resource. Resources are supported for older script compatibility.
2004-11-16How to send mail and execute other AppleScripts from a Carbon application.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.