Skip navigation.
 
mlRe: Adding commandline batch mode to Cocoa app
FROM : Brian Stern
DATE : Sun Mar 23 18:35:19 2008

On Mar 23, 2008, at 4:43 AM, Carsten wrote:

> Ah, okay, I see now. My script will just launch the application
> executable with a specific commandline that forces it into batch mode,
> so the difference in functionality or convenience between a symlink to
> a tool and a generated one-liner script (plus some error handling for
> a broken link) is probably too small to bother about the development
> of the tool, I think.


And what will your app do if it is already running in non-batch mode 
when the user runs this script?

From the beginning "mode" has been a four letter word among Mac 
developers.

You could do worse than to follow Photoshop's model for this problem. 
Have a menu item that opens a dialog and allows the user to set up 
batch processing.  Make your app scriptable and allow the user to 
access the batch functionality from Applescript.

If you want to be fancy you can auto-generate applescripts that do 
whatever the user has done in the Batch window.  Photoshop has this 
functionality and it's called droplets.  (I don't know how they work 
actually but they appear to be applescripts or applescripts plus 
something else.)

Who is the target audience for your application?  If it at all 
includes "regular Mac users" then any solution that involves the 
Terminal and /usr/bin is not a good solution.

--
Brian Stern
<email_removed>

Related mailsAuthorDate
mlAdding commandline batch mode to Cocoa app Carsten Mar 22, 23:26
mlRe: Adding commandline batch mode to Cocoa app Tom Harrington Mar 22, 23:36
mlRe: Adding commandline batch mode to Cocoa app Carsten Mar 23, 00:01
mlRe: Adding commandline batch mode to Cocoa app Marcus Mar 23, 06:46
mlRe: Adding commandline batch mode to Cocoa app Carsten Mar 23, 09:10
mlRe: Adding commandline batch mode to Cocoa app Marcus Mar 23, 09:31
mlRe: Adding commandline batch mode to Cocoa app Carsten Mar 23, 09:43
mlRe: Adding commandline batch mode to Cocoa app Brian Stern Mar 23, 18:35
mlRe: Adding commandline batch mode to Cocoa app Carsten Mar 23, 22:08
mlRe: Adding commandline batch mode to Cocoa app Scott Ribe Mar 23, 22:16
mlRe: Adding commandline batch mode to Cocoa app Sherm Pendley Mar 23, 22:35
mlRe: Adding commandline batch mode to Cocoa app Carsten Mar 23, 22:43