• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSApplescript Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSApplescript Issue
      • From: cricket <email@hidden>
References: 
 >Re: NSApplescript Issue (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: How do you tab into an NSTableView?
  • Next by Date: Re: Why I think I'm so lost
  • Previous by thread: Re: NSApplescript Issue
  • Next by thread: Re: NSApplescript Issue
  • Index(es):
    • Date
    • Thread