• 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: NSTask is Weird
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask is Weird


  • Subject: Re: NSTask is Weird
  • From: Andrew Farmer <email@hidden>
  • Date: Wed, 10 Sep 2008 21:12:25 -0700

On 10 Sep 08, at 20:24, J. Todd Slack wrote:
Here it the command I am executing:

/usr/local/bin/pymp3cut --segment "/Users/slack/Library/Application Support/Ring-Maker/tmp/amber",00:00:11,00:00:36 "/Users/slack/Music/ iTunes/iTunes Music/311/Unknown Album/01 Amber.mp3"

I get this from the debugger console:

2008-09-10 20:18:20.242 Ring-Maker[4174:10b] An exception was thrown during execution of an NSScriptCommand...
2008-09-10 20:18:20.242 Ring-Maker[4174:10b] launch path not accessible


Here is what I am doing:
<snip>
/* take all the pieces and build up command for NSTask */
arguments = [NSArray arrayWithObjects: strArguments, nil];

Arguments needs to be an array containing one element per argument to the task, including argv[0] as the name of the executable. Per the documentation, note also that


The strings in arguments do not undergo shell expansion, so you do not need to do special quoting...

In your case, the correct arguments array would be something like

arguments = [NSArray arrayWithObjects:@"pymp3cut",
@"--segment",
@"/Users/slack/Library/Application Support/Ring-Maker/tmp/amber, 00:00:11,00:00:36",
@"/Users/slack/Music/iTunes/iTunes Music/311/Unknown Album/01 Amber.mp3",
nil];
_______________________________________________


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: NSTask is Weird
      • From: Jim Correia <email@hidden>
References: 
 >NSTask is Weird (From: "J. Todd Slack" <email@hidden>)

  • Prev by Date: Re: How do people typically implement dialog controllers?
  • Next by Date: Re: How do people typically implement dialog controllers?
  • Previous by thread: NSTask is Weird
  • Next by thread: Re: NSTask is Weird
  • Index(es):
    • Date
    • Thread