Re: NSApplescript Issue
Re: NSApplescript Issue
- Subject: Re: NSApplescript Issue
- From: cricket <email@hidden>
- Date: Fri, 8 Aug 2003 11:34:47 -0700
Not sure what's wrong either, but I can tell you what always works for
me. I create a text file that has the text of the Applescript in it,
and load it with NSString's -initWithContentsOfFile.
- crickt
On Friday, August 8, 2003, at 10:59 AM, Mathew Peterson wrote:
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,
----->
Software Entomologist Mail for Mac OS X
http://www.apple.com/macosx/panther/mail.html
---------->
When does it stop being the sincerest form of flattery and just become
utter, pathetic laziness?
_______________________________________________
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.