Questions about console app

I want to create a console app for Mac OS X. However, before I pay for the upgrade to allow console apps, I’ve got some questions.

  1. Will running a console app always open the Terminal, as happens when debugging? Ideally, I’d want people to be able to potentially run it from some other program capable of invoking shell commands, without having Terminal pop up. (Specifically, so admins could run it remotely on a user Mac without any interface on the user end.)

  2. Are there any classes that cannot be used in a console app, other than the obvious (ie, classes that involve user interface elements)?

  3. Is it safe to assume that invoking the app via sudo will give it root permissions, just as you would expect of any other shell command?

  4. Is there any kind of documentation of this stuff? I’m not finding it if there is.

Thanks in advance!

Don’t really understand this. Debugger actually launched a process each time is called, but when compiled it behaves as any other command line tool.

AFAIK no. Maybe some graphical classes, but MBS handles this in most scenarios. I don’t remember any obvious difference.

For the rest of questions I am not 100% sure ( my work is very server-client oriented ) but I am really happy with Console Apps and works perfectly for all my needs.

[quote=163483:@Thomas Reed]1) Will running a console app always open the Terminal, as happens when debugging?
[/quote]
No. That Terminal window is opened by the debugger, not your app.

[quote]2) Are there any classes that cannot be used in a console app, other than the obvious (ie, classes that involve user interface elements)?
[/quote]
The graphics classes are a little limited. Picture formats in particular - you can only use JPEG and PNG.

[quote]3) Is it safe to assume that invoking the app via sudo will give it root permissions, just as you would expect of any other shell command?
[/quote]
Yes.

[quote]4) Is there any kind of documentation of this stuff? I’m not finding it if there is.
[/quote]
It should be in one of the User’s Guides. There are a few references to console limitations sprinkled throughout the Language Ref.

Windows always shows the Terminal window unless it is run as a Service.

Yes but the OP specifically ask about Mac OS X.

No, the terminal window will not open under those conditions - on all platforms. I have 13 Console apps that my GUI apps call from Shells. They work exactly the way you are wanting them to work. As @Tim Hare has mentioned, the Terminal window is opened by the debugger so that you can see what’s happening.

Yes, but they shouldn’t be available to you when you create your Console app. If in doubt, the Language Reference should answer specifically.

Yes - this is exactly how it works on OS X and Linux. For Windows, things get a bit more convoluted.

You just read it :).

Not true.

Thanks Tim — I stand corrected.

I am now trying to build MBS ChartDirector charts inside a Console ‘Schedule’ application for MacOS et al which will then be emailed via CurlMBS. I am updating a Status field in a database so a Web app can see the progress!