Hi
You can try Win32::GuiTest http://search.cpan.org/~karasik/Win32-GuiTest-1.60/lib/Win32/GuiTest.pm and using FindWindowLike , SendKeys APIs, you can send key strokes to Any window (including cmd prompt)
I have done a script some time back to do the similar job.
- start the app / script which needs an input in background and redirect the output to file, (Ex:start perl.exe abc.pl > out.txt 2>&1 )
- Monitor out.txt in your automate script and look for patterns to enter your input
- use Win32::GuiTest and send keystroke to the app/script which was started in background.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|