Reputation: 305
I need to call another app from my app, and send it some command line arguments. Using launchApplication works well, but I don;t know how to send the command line arguments with it. System() will send command line args, but the app appears behind the calling app.
Thanks,
Bill
Upvotes: 1
Views: 1522
Reputation: 69027
Have a look at this S.O. post for some hints.
Under Snow Leopard, you can use launchApplicationAtURL:options:configuration:error
to pass arguments. Simply build a configuration dictionary giving NSWorkspaceLaunchConfigurationArguments
as key to your array of arguments.
Upvotes: 3