Interface

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Sandritto
Posts: 7
Joined: 19 Jul 2018 04:28

Interface

#1 Post by Sandritto » 24 Jul 2018 00:30

Hi there!

I was wondering if there is anyway to make the data input interface a bit more "attractive" with batch.

Kind of a Windows box or something so that a normal user doesn't have to see the Command prompt.

Thanks!

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Interface

#2 Post by aGerman » 24 Jul 2018 00:52

Windows has scripting languages like VBScript or JScript on board that can be run without a window and where you would use default dialog boxes instead. The fact that those are really only default dialogs makes it actually less flexible. However, cmd.exe (which is the interpreter for Batch scripts) is a console program and thus, runs in a text-based console window which is the user interface in that case. If you're not happy whith that console window I'd really recomment you to use another language. Sure, you could use hybrid scripts to display dialogs but that looks rather weird to users that expect to work with the console window in Batch.

Steffen

Sandritto
Posts: 7
Joined: 19 Jul 2018 04:28

Re: Interface

#3 Post by Sandritto » 24 Jul 2018 01:13

It's just one dialog box I'd like to use. I've been looking for examples but couldn't find any...

Thanks for the answer!

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Interface

#4 Post by ShadowThief » 24 Jul 2018 01:58

aGerman wrote:
24 Jul 2018 00:52
Windows has scripting languages like VBScript or JScript on board that can be run without a window and where you would use default dialog boxes instead. The fact that those are really only default dialogs makes it actually less flexible. However, cmd.exe (which is the interpreter for Batch scripts) is a console program and thus, runs in a text-based console window which is the user interface in that case. If you're not happy whith that console window I'd really recomment you to use another language. Sure, you could use hybrid scripts to display dialogs but that looks rather weird to users that expect to work with the console window in Batch.

Steffen
There's always HTA as well.

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Interface

#5 Post by aGerman » 24 Jul 2018 04:26

Sandritto wrote:
24 Jul 2018 01:13
It's just one dialog box I'd like to use. I've been looking for examples but couldn't find any...
Can you give some more information?
There is a Messagebox dialog that just displays a message or a question and you have buttons lik Yes, No or Yes,No, Cancel. There is also an Inputbox where you can fill in freetext. Another possibility is a BrowseForFolder dialog where you can pick up a folder out of an Explorer-like window.
ShadowThief wrote:
24 Jul 2018 01:58
There's always HTA as well.
Of course. But in that case you may need an additional text file as interface between the two processes.

Steffen

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: Interface

#6 Post by Squashman » 24 Jul 2018 07:50

Frank Westlake made a bunch of utilities that had that functionality. Don't believe his website is up anymore but they are all hosted on SS64.
http://ss64.net/westlake/nt/

Aacini
Expert
Posts: 1885
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: Interface

#7 Post by Aacini » 24 Jul 2018 08:21

Perhaps the technique described at this thread may help you...

Antonio

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Interface

#8 Post by aGerman » 24 Jul 2018 10:18

I completely forgot about that you could write to stdout from within a HTA script :roll:

Sandritto
Posts: 7
Joined: 19 Jul 2018 04:28

Re: Interface

#9 Post by Sandritto » 26 Jul 2018 01:21

Many thanks for the answers!

Sandritto

Post Reply