![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Scripting prompt input I need help scripting a code that will do the following, (I'm very bad at this so if you can make it dummy proof it would be great...ie tell me where to fill things in) I have a program called cgwave.exe and it opens up in a DOS window. When the program opens, it asks me for the name of the input file. I put in the name and hit enter then the program runs. I need to run this process in a loop "x" number of times for "x" number of input files. My only variable is the name of the input file. I was told to use WASP and I'm not getting far in that. This is what I have so far using WASP; $window = Select-Window cgwave $file = "Final_test_monocramatic_03s_0721.cgi{Enter}" Send-Keys $window $file The problem with it thus far is that it doesn't write anything into the command prompt. If I replace "cgwave" with "notepad" it works fine so I don't think WASP is going to work for me. Can I do this in a batch file easier?? Thank you for your help and remember, I'm not to bright at this stuff so detailed explaination would help. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Scripting prompt input If cgwave.exe accepts input then you can do it. For instance: 1. Create a Test directory on your C drive 2. Inside the Test create a test file. 3. Create an input file that stores the input you would like to auto enter In the example below I created c:\input.txt and typed inside this lines: Y [PRESS ENTER] Now you can delete the none empty directory like so: C:\>rd c:\test /S < input.txt c:\test, Are you sure (Y/N)? Y # folder deleted --- Shay Levy Windows PowerShell http://blogs.microsoft.co.il/blogs/ScriptFanatic P> I need help scripting a code that will do the following, (I'm very P> bad at this so if you can make it dummy proof it would be great...ie P> tell me where to fill things in) P> P> I have a program called cgwave.exe and it opens up in a DOS window. P> When the program opens, it asks me for the name of the input file. I P> put in the name and hit enter then the program runs. I need to run P> this process in a loop "x" number of times for "x" number of input P> files. My only variable is the name of the input file. P> P> I was told to use WASP and I'm not getting far in that. This is what P> I have so far using WASP; P> P> $window = Select-Window cgwave P> $file = "Final_test_monocramatic_03s_0721.cgi{Enter}" P> Send-Keys $window $file P> The problem with it thus far is that it doesn't write anything into P> the command prompt. If I replace "cgwave" with "notepad" it works P> fine so I don't think WASP is going to work for me. P> P> Can I do this in a batch file easier?? Thank you for your help and P> remember, I'm not to bright at this stuff so detailed explaination P> would help. P> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Prompt for input if import-csv not used? | PowerShell | |||
| VB scripting help | VB Script | |||
| UAC and scripting | Vista General | |||
| Chinese Traditional Input using Phonetic Input | Vista General | |||
| Scripting bug? | PowerShell | |||