Re: NSApplescript Issue
Re: NSApplescript Issue
- Subject: Re: NSApplescript Issue
- From: "Alastair J.Houghton" <email@hidden>
- Date: Fri, 8 Aug 2003 16:50:44 +0100
On Friday, August 8, 2003, at 04:19 pm, Mathew Peterson wrote:
I have this code as below:
NSString *scriptText = @"set myFile to \":la.m4a\" as alias \n\
tell application \"iTunes\" \n\
add myFile to library playlist 1 \n\
end tell";
NSAppleScript *play= [[NSAppleScript alloc]
initWithSource:scriptText];
NSLog(@"%@", [[play executeAndReturnError:nil] stringValue]);
[play release];
It refuses to execute correctly even though if I run it in script
editor it runs fine. Is NSApplescript really picky or is it just my
code?
It's just a guess, because I don't really know much about Applescript,
but try replacing the '\n's with '\r's.
Kind regards,
Alastair.
_______________________________________________
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.