Hi All,
NSTask seems weird to me.
I am trying to call a command-line app with arguments.
When I execute in a Terminal it works, but from my application is fails.
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:
NSString *strArguments = [NSString stringWithFormat: @"[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@
[EMAIL PROTECTED]@[EMAIL PROTECTED]@%@",
@"--segment",
@" ",
@"\"",
ringToneNameMP3Path,
@"\"",
@",",
startStr,
@",",
endStr,
@" ",
@"\"",
path,
@"\""
];
/* take all the pieces and build up command for NSTask */
arguments = [NSArray arrayWithObjects: strArguments, nil];
[task setLaunchPath: @"/usr/local/bin/pymp3cut"];
[task setArguments: arguments];
[task setStandardOutput: pipe];
[task launch];
In the debugger it shows:
/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"
Which looks right.
Any thoughts?
-Jason
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]