L
L
lik1732020-12-30 11:50:41
linux
lik173, 2020-12-30 11:50:41

How to output values ​​to a file using BAT in dialog?

I have dialog on windows.
I enter in the batch file dialog --menu "Example" 80 90 20 1 Function 2 None
Everything works, but how to display the answer value in BAT?
I could do it on a shell, but I write under Windows.
How to do it?
I would like to output to a file and then type:
if %a%==1 goto func

And how to make an output in all dialogs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2020-12-30
@res2001

Your dialog must communicate the results of your work in some way.
Usually, console utilities use either a return code (the result of return in main), or, if there is a lot of information returned, text output to the console. In the batch file, the output to the console and the return code can be processed as you need.
You can do the same in dialog, regardless of the fact that it is not a console application.

I could do it on shell

In fact, everything is the same in nix - the called program must somehow inform the caller of the results of its work. The standard options are the same in Windows and in nix.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question