Re: NSTask is Weird
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