AppleScript...
AppleScript...
- Subject: AppleScript...
- From: Jerry LeVan <email@hidden>
- Date: Mon, 8 Mar 2004 20:21:58 -0500
How come I have to use "\n" in the NSAppleScript call below but Script
Editor and
osascript do not require the new line character?
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString *cmd= @"tell app \"Finder\" \nopen posix file
\"/Users/jerry/Documents/SQL Stuff\"\n end";
NSDictionary *err= [[NSDictionary alloc] init];
NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource:cmd];
NSAppleEventDescriptor * result =[myScript executeAndReturnError:
&err];
NSLog(@"result:%@",result);
NSLog(@"err:%@" ,err);
//system("osascript -e 'tell app \"Finder\" to open posix file
\"/Users/jerry/Documents/SQL Stuff\"'");
[pool release];
return 0;
}
Thanks,
Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.