• 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
shell script in AppleScript ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shell script in AppleScript ?


  • Subject: shell script in AppleScript ?
  • From: Caroline <email@hidden>
  • Date: Fri, 18 Jan 2008 14:50:21 +0900
  • Importance: normal

I'm using NSAppleScript & "do shell script" in my Cocoa App.
But, I have some problems.

In Terminal,
script is -> cmd option "Picture 1" "Picture 2".
It is good.

But in cocoa App,
script is -> NSString *sCmd = @"cmd option \"Picture 1\" \"Picture 2\";
 NSAppleScript *script = [NSAppleScript alloc] initWithSource:[NSString strintWithFormat:@"do shell script %@",sCmd]];
Using '\"' because whitespace. (between Picture and 1)

It has error.
(NSAppleScriptErrorMessage : "A identifier can\U2019t go after this \U201c\"\U201d.";)

How can I deal whitespace?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: shell script in AppleScript ?
      • From: Christopher Nebel <email@hidden>
    • Re: shell script in AppleScript ?
      • From: Rob Keniger <email@hidden>
  • Prev by Date: help w/ async message queue
  • Next by Date: Re: shell script in AppleScript ?
  • Previous by thread: Re: help w/ async message queue
  • Next by thread: Re: shell script in AppleScript ?
  • Index(es):
    • Date
    • Thread