Re: NSApplescript Issue
Re: NSApplescript Issue
- Subject: Re: NSApplescript Issue
- From: Mathew Peterson <email@hidden>
- Date: Fri, 8 Aug 2003 11:59:34 -0600
Well the string is being created correctly, so switching to \r's didn't
help.
Anyone have any ideas?
On Friday, Aug 8, 2003, at 09:50 America/Denver, Alastair J.Houghton
wrote:
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.
_______________________________________________
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.