I have a applescript-objc script with a method as follows :-
on say_(phrase, userName)
set whatToSay to "\"" & phrase & " " & userName & "\""
say whatToSay
end say_
And i want to call this method from objective-c but cant seem to figure out how to call methods with multiple arguments, i have no problem calling methods with only one argument as follows :-
@interface NSObject (ASHandlers)
- (void)say:(NSString *)phrase;
@end
@implementation AppDelegate
@synthesize window, sayTextField;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
scriptFile = NSClassFromString(@"Test");
if ( !scriptFile ){
// Handle errors here
return;
}
}
- (IBAction)say:(id)sender{
NSString *phrase = [sayTextField stringValue];
[scriptFile say:phrase];
}
please can someone help.
Regards, Andy.