Hi all,
I have a complex scripts to do installation job. This scripts is mainly for manually run so that you can provide value for it or select the option to do then hit the enter to continue the job.
Now my question is if I want to run in command line without interactive response, in other words it will pick up the option or value by itself (or automatically).
I could think of two options
1) modify the scripts to use wanted value or option to pick..
2) or no touch the original scripts add some extra file to feed this script to do the automatic installation.
I prefer to use second choice since I do want to touch or modified the original one. If there is no choice other than to modify the original scripts then I will do..
Any thoughts?
Thanks
How to handle pop or manual input in an existing batch less touch the original scripts file
Moderator: DosItHelp
Re: How to handle pop or manual input in an existing batch less touch the original scripts file
Difficult to tell without knowing what scripts you're talking about. However
Steffen
- While a script is waiting for input its execution is interrupted. So, you need another asynchronously running process to somehow react and send the expected input exactly to the right window and exactly at the right time.
- Pure Batch can't interact with a window. There's no native way to emulate mouse or keyboard input without using either another language or a 3rd party utility.
Steffen
Re: How to handle pop or manual input in an existing batch less touch the original scripts file
Steffen already summairezed it. But if you have only batch scripts you could use a special .txt file with prefedined answers (but in this way you have to copy these two files together). Or you could put them in a batch file itself. Of course some reprogramming must be done.
Saso
Saso
Re: How to handle pop or manual input in an existing batch less touch the original scripts file
The main scripts attached. Also this script used a configure file called Factory.cfg (we can ignore the Customer.cfg)
What I need is to do below steps:
1) I need get rid of pop up (run command line only)
2) First need variable for com.
3) Have option 3 to do Clear Terminal, need get rid of "Enter" manual step by hitting the enter
4) when the above done, next is to do option 1 Load All with Profile
What I need is to do below steps:
1) I need get rid of pop up (run command line only)
2) First need variable for com.
3) Have option 3 to do Clear Terminal, need get rid of "Enter" manual step by hitting the enter
4) when the above done, next is to do option 1 Load All with Profile
Last edited by goodywp on 04 Jun 2022 11:42, edited 2 times in total.
Re: How to handle pop or manual input in an existing batch less touch the original scripts file
goodywp wrote: ↑03 Jun 2022 11:41The main scripts attached. Also this script used a configure file called Factory.cfg (we can ignore the Customer.cfg)
What I need is to do below steps:
1) I need get rid of pop up (run command line only)
2) First need variable for com.
3) Have option 3 to do Clear Terminal, need get rid of "Enter" manual step by hitting the enter
4) when the above done, next is to do option 1 Load All with Profile
Download.zipFactory.zip
Re: How to handle pop or manual input in an existing batch less touch the original scripts file
FYI, I made a new simplified one. Thanks all!