
Objc-appscript is a high-level Apple event bridge that allows you to control scriptable Mac OS X applications from Objective-C programs.
For example, to get the value of the first paragraph of the topmost document in TextEdit:
TEApplication *textedit = [[TEApplication alloc] initWithName: @"TextEdit"];
TEReference *ref = [[[[textedit documents] byName: @"ReadMe"] paragraphs] at: 1];
NSString *result = [[ref get] send];
[textedit release];
This is equivalent to the AppleScript statement:
tell application "TextEdit"
get paragraph 1 of document "ReadMe"
end tell
ObjC-appscript requires MacOS X 10.3 or later.
Please note that objc-appscript is currently under active development, with some APIs and functionality not yet implemented and others likely to change later on as the design is refined.