Version 1.1, 2011-07-14
Updated all classes to use properties and improved error handling. Project updated for Xcode 4.
(Full Revision History)
Xcode 3.2, Mac OS X 10.6 Snow Leopard or later
This app uses Apple events to communicate over TCP/IP so you must have "Remote Apple Events" turned on in the "Sharing" pane of the "System Preferences" before you can run the application. Mac OS X 10.6 Snow Leopard or later.
If your application needs to communicate with other applications or processes, it can use AppleScript as a communication layer. Using the techniques described here, the included scripts handle all of the communication details while your application just makes calls to the scripting machinery. This design allows you to modularize the part of your application concerned with interprocess communication. The scripts are stored in the application's Resources folder and can be tuned in the field for particular needs and requirements, potentially by end users, without needing to recompile the application.
This sample targets the iTunes application, using remote Apple events over a network. The scripts handle all of the details involved in communicating with iTunes, while the program provides the user interface.