source: releases/Pester/1.1a1/Source/NDAppleScript/NDAppleScriptObject.h@ 71

Last change on this file since 71 was 35, checked in by Nicholas Riley, 22 years ago

Nathan Day's NDAppleScript and related classes, somewhat modified.
Still need to commit Nathan's changes to NDResourceFork.

File size: 2.5 KB
Line 
1/*
2 * NDAppleScriptObject.h
3 * NDAppleScriptObjectProject
4 *
5 * Created by nathan on Thu Nov 29 2001.
6 * Copyright (c) 2001 Nathan Day. All rights reserved.
7 */
8
9#import <Foundation/Foundation.h>
10#import <Carbon/Carbon.h>
11#import "NDAppleScriptObject_Protocols.h"
12
13@interface NDAppleScriptObject : NSObject <NDAppleScriptObjectSendEvent, NDAppleScriptObjectActive>
14{
15 @private
16 OSAID compiledScriptID, resultingValueID;
17 NDAppleScriptObject * contextAppleScriptObject;
18 id<NDAppleScriptObjectSendEvent> sendAppleEventTarget;
19 id<NDAppleScriptObjectActive> activeTarget;
20 ComponentInstance osaComponent;
21
22 long executionModeFlags;
23}
24
25+ (id)compileExecuteString:(NSString *) aString;
26+ (Component)findNextComponent;
27
28+ (id)appleScriptObjectWithString:(NSString *) aString;
29+ (id)appleScriptObjectWithData:(NSData *) aData;
30+ (id)appleScriptObjectWithContentsOfFile:(NSString *) aPath;
31+ (id)appleScriptObjectWithContentsOfURL:(NSURL *) aURL;
32
33- (id)initWithString:(NSString *)aString modeFlags:(long)aModeFlags;
34- (id)initWithContentsOfFile:(NSString *)aPath;
35- (id)initWithContentsOfFile:(NSString *)aPath component:(Component)aComponent;
36- (id)initWithContentsOfURL:(NSURL *)anURL;
37- (id)initWithContentsOfURL:(NSURL *)aURL component:(Component)aComponent;
38- (id)initWithData:(NSData *)aDesc;
39
40- (id)initWithString:(NSString *)aString modeFlags:(long)aModeFlags component:(Component)aComponent;
41- (id)initWithData:(NSData *)aData component:(Component)aComponent;
42
43- (NSData *)data;
44
45- (BOOL)execute;
46- (BOOL)executeOpen:(NSArray *)aParameters;
47- (BOOL)executeEvent:(NSAppleEventDescriptor *)anEvent;
48
49- (NSArray *)arrayOfEventIdentifier;
50- (BOOL)respondsToEventClass:(AEEventClass)aEventClass eventID:(AEEventID)aEventID;
51
52- (NSAppleEventDescriptor *)resultAppleEventDescriptor;
53- (id)resultObject;
54- (id)resultData;
55- (NSString *)resultAsString;
56
57 //- (void)setContextAppleScriptObject:(NDAppleScriptObject *)aAppleScriptObject; // NOT FUNCTIONING YET
58- (long)executionModeFlags;
59- (void)setExecutionModeFlags:(long)aModeFlags;
60
61- (void)setDefaultTarget:(NSAppleEventDescriptor *)aDefaultTarget;
62- (void)setDefaultTargetAsCreator:(OSType)aCreator;
63- (void)setFinderAsDefaultTarget;
64
65- (void)setAppleEventSendTarget:(id)aTarget;
66- (id)appleEventSendTarget;
67- (void)setActiveTarget:(id)aTarget;
68- (id)activeTarget;
69
70- (NSAppleEventDescriptor *)targetNoProcess;
71
72- (BOOL)writeToURL:(NSURL *)aURL;
73- (BOOL)writeToURL:(NSURL *)aURL Id:(short)anID;
74- (BOOL)writeToFile:(NSString *)aPath;
75- (BOOL)writeToFile:(NSString *)aPath Id:(short)anID;
76
77@end
Note: See TracBrowser for help on using the repository browser.