5 * Class that provides utilities for sending AppleEvents
6 * (and OSA scripts) using Carbon function calls in Cocoa
8 * Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
9 * Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
10 * : Kent Sutherland <kent.sutherland@ithinksw.com>
12 * Copyright (c) 2002 - 2003 iThink Software.
17 #import <Cocoa/Cocoa.h>
18 #import <Carbon/Carbon.h>
21 @interface ITAppleEvent : NSObject {
23 AppleEvent event, reply;
26 * INITIALIZATION METHODS - AppleScript
28 * These methods initialize an instance of ITAppleEvent
29 * with AppleScript/OpenScripting data
31 - (id)initWithOSASource:(NSString *)source;
32 - (id)initWithOSACompiledData:(NSData *)data;
33 - (id)initWithOSAFromContentsOfURL:(NSURL *)url;
34 - (id)initWithOSAFromContentsOfPath:(NSString *)path;
36 `* INITIALIZATION METHODS - AppleEvent
38 * This method initializes an instance of ITAppleEvent
39 * with an AppleEvent class (usually the creator id
40 * of the AppleEvent's target) and an AppleEvent ID
42 - (id)initWithAppleEventClass:(AEEventClass)eventClass appleEventID:(AEEventID)eventID;
46 - (NSString *)OSASource;
47 - (void)setOSASource:(NSString *)source;
48 - (NSData *)OSACompiledData;
49 - (void)setOSACompiledData:(NSData *)data;
50 - (AEEventClass)appleEventClass;
51 - (AEEventID)appleEventID;
52 - (NSString *)execute;