Steve 30 Posted December 5, 2013 Report Share Posted December 5, 2013 Wondering if anyone can help me with this... I'm trying to run program from command prompt and have it automatically answer a few input questions, so I'm guessing I need to run a bat file. What I need to do is run a file with a passed param, for example: "theprogram.exe c:\image.jpg". After it runs, in the cmd window, the program asks for an input that I need to automatically answer and press enter, then it asks another question and I need to respond to that one as well. I'm sure it's pretty easy, but I'm not exactly sure what I'm doing when it comes to batch files... p.s. I already have uBotDev's plugin, I just don't know what commands to run for it to answer the inputs. Thanks guys! Quote Link to post Share on other sites
k1lv9h 76 Posted December 5, 2013 Report Share Posted December 5, 2013 Hi, This works for me: set /P myname="Enter name: "Kevin Quote Link to post Share on other sites
Steve 30 Posted December 5, 2013 Author Report Share Posted December 5, 2013 Hi Kevin, I'm not exactly sure I understand... So my bat file would look like this? (as you can guess it didn't work like that) theprogram.exe c:\image.jpg set /P namethefile="Please enter a name for the file: " Here's what happens, when I run a bat file with just: theprogram.exe c:\image.jpg it prompts the user: "Please enter a name for the file: ", and I need to automatically fill that out and then press enter so the next question appears. Quote Link to post Share on other sites
k1lv9h 76 Posted December 5, 2013 Report Share Posted December 5, 2013 Hi, Yeah your are correct. My code sample just set a value via command prompt. Does not interact with a program. Weird the program you are running does not provide a means to pass additional value(s) for the prompt(s). Kevin Quote Link to post Share on other sites
Steve 30 Posted December 6, 2013 Author Report Share Posted December 6, 2013 Yeah -- oh well.I've come up with somewhat of a workaround that should work for now. thanks anyhow. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.