Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Command-line AND double-click on Windows (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: [ANN] MKS Plugin 3.0
Next thread: How to implement automatic updates?


Re: How to implement automatic updates?   -   Garth Hjelte
  Command-line AND double-click on Windows   -   wagnerj proaxis.com
   Re: Command-line AND double-click on Windows   -   Jim Wagner
   Re: Command-line AND double-click on Windows   -   Stéphane Mons <
   Re: Command-line AND double-click on Windows   -   Jon Ogden
    Re: Command-line AND double-click on Windows   -   Eduardo Gutierrez de Oliveira

Command-line AND double-click on Windows
Date: 04.08.11 22:23 (Thu, 4 Aug 2011 14:23:11 -0700 (PDT))
From: wagnerj proaxis.com
Greetings, folks -

I have a little app that is being written to do a format conversion on a
batch of files. I would LIKE to allow it to be launched via double-click
on Windows with a standard GUI showing progress status, etc. And, for some
users who want to automate its execution, I want to be able to run it from
a command line with parameters (directory path, for example) but NO GUI
dialogs.

The first question is how to read the command line. I see references to an
"Input" class and a "StandardInputStream" but these appear to function
only for a console app. Is it fantasy to think about command-line as an
optional input to a standard desktop app?

My second question (assuming command-line is possible in this situation)
is how to suppress the first window that is automatically opened by the
app object.

Many thanks
Jim Wagner

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Command-line AND double-click on Windows
Date: 05.08.11 07:49 (Thu, 4 Aug 2011 23:49:35 -0700)
From: Jim Wagner
Ahhh, thank you Stephane!

Jim Wagner
On Aug 4, 2011, at 11:42 PM, Stéphane Mons wrote:

> The full command line is available as System.CommandLine
>
> To avoid having a window automatically opened at startup, just clear
> the DefaultWindow property of the App object. To display it, add
> something like "Window1.Show" in the App.Open event.
>
> However, having a console app AND a GUI wrapper is a good solution
> too. Or you can write 2 different apps which share the same main
> conversion code using external items. It's up to you.
>
> 5 REM My Signature
> 10 PRINT "Stéphane"
> 20 GOTO 10
>
> Le 5 août 2011 à 00:07, Jon Ogden a écrit :
>
>> I don't think it's possible to have a GUI and command line
>> interface in the same app. I could be wrong.
>>
>> But I think you could write a console app. The write a GUI app that
>> interfaces with the console app.
>>
>> Jon
>>
>> Sent from my iPhone
>>
>> On Aug 4, 2011, at 4:23 PM, <email address removed> wrote:
>>
>>> Greetings, folks -
>>>
>>> I have a little app that is being written to do a format
>>> conversion on a
>>> batch of files. I would LIKE to allow it to be launched via double-
>>> click
>>> on Windows with a standard GUI showing progress status, etc. And,
>>> for some
>>> users who want to automate its execution, I want to be able to run
>>> it from
>>> a command line with parameters (directory path, for example) but
>>> NO GUI
>>> dialogs.
>>>
>>> The first question is how to read the command line. I see
>>> references to an
>>> "Input" class and a "StandardInputStream" but these appear to
>>> function
>>> only for a console app. Is it fantasy to think about command-line
>>> as an
>>> optional input to a standard desktop app?
>>>
>>> My second question (assuming command-line is possible in this
>>> situation)
>>> is how to suppress the first window that is automatically opened
>>> by the
>>> app object.
>>>
>>> Many thanks
>>> Jim Wagner
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Command-line AND double-click on Windows
Date: 05.08.11 07:42 (Fri, 5 Aug 2011 08:42:10 +0200)
From: Stéphane Mons <
The full command line is available as System.CommandLine

To avoid having a window automatically opened at startup, just clear the DefaultWindow property of the App object. To display it, add something like "Window1.Show" in the App.Open event.

However, having a console app AND a GUI wrapper is a good solution too. Or you can write 2 different apps which share the same main conversion code using external items. It's up to you.

5 REM My Signature
10 PRINT "Stéphane"
20 GOTO 10

Le 5 août 2011 à 00:07, Jon Ogden a écrit :

> I don't think it's possible to have a GUI and command line interface in the same app. I could be wrong.
>
> But I think you could write a console app. The write a GUI app that interfaces with the console app.
>
> Jon
>
> Sent from my iPhone
>
> On Aug 4, 2011, at 4:23 PM, <email address removed> wrote:
>
>> Greetings, folks -
>>
>> I have a little app that is being written to do a format conversion on a
>> batch of files. I would LIKE to allow it to be launched via double-click
>> on Windows with a standard GUI showing progress status, etc. And, for some
>> users who want to automate its execution, I want to be able to run it from
>> a command line with parameters (directory path, for example) but NO GUI
>> dialogs.
>>
>> The first question is how to read the command line. I see references to an
>> "Input" class and a "StandardInputStream" but these appear to function
>> only for a console app. Is it fantasy to think about command-line as an
>> optional input to a standard desktop app?
>>
>> My second question (assuming command-line is possible in this situation)
>> is how to suppress the first window that is automatically opened by the
>> app object.
>>
>> Many thanks
>> Jim Wagner


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Command-line AND double-click on Windows
Date: 04.08.11 23:07 (Thu, 04 Aug 2011 17:07:46 -0500)
From: Jon Ogden
I don't think it's possible to have a GUI and command line interface in the same app. I could be wrong.

But I think you could write a console app. The write a GUI app that interfaces with the console app.

Jon

Sent from my iPhone

On Aug 4, 2011, at 4:23 PM, <email address removed> wrote:

> Greetings, folks -
>
> I have a little app that is being written to do a format conversion on a
> batch of files. I would LIKE to allow it to be launched via double-click
> on Windows with a standard GUI showing progress status, etc. And, for some
> users who want to automate its execution, I want to be able to run it from
> a command line with parameters (directory path, for example) but NO GUI
> dialogs.
>
> The first question is how to read the command line. I see references to an
> "Input" class and a "StandardInputStream" but these appear to function
> only for a console app. Is it fantasy to think about command-line as an
> optional input to a standard desktop app?
>
> My second question (assuming command-line is possible in this situation)
> is how to suppress the first window that is automatically opened by the
> app object.
>
> Many thanks
> Jim Wagner
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Command-line AND double-click on Windows
Date: 04.08.11 23:27 (Fri, 05 Aug 2011 00:27:51 +0200)
From: Eduardo Gutierrez de Oliveira
It is possible. In your app's open event you can check for parameters and only display windows of they're missing or incorrect. I'm on vacation and can't check how exactly I had it (although I only tested it in debug mode. Never ended up releasing it in production since it meant launching the full executable and a dedicated CLI executable was smaller and faster.