Hi!

I am trying to install a software in Windows. The s/w has only GUI mode installation. I have found that Win32::Setupsup module can be used to automate the installation. But when I was trying to use this module, I faced a problem to send data in a text field and then press the "next" button. I have installed the module in Perl v5.6.1 on w2k. Here is my code

use strict; use Win32::Setupsup qw(WaitForAnyWindow GetWindowProperties SendKeys S +etFocus); my ($window); system (1, "setup.exe"); if (WaitForAnyWindow("windows name", \$window, 6000, 500)) { SetFocus ($window); sleep (2); SendKeys ($windows,'textvalue',1); sleep (1); SendKeys ($windows,'\\TAB\\',1); sleep (1); SendKeys ($windows,'\\RET\\',1); sleep (2); }
But the keystroke is not going to the text field which is desirable to me. Any pointer how to send keystroke to the text field? Any help really appreciated.

Thanks in advance.
-Pijush

Edit by tye, preserve formatting


In reply to Help needed for using Win32::Setupsup module by pijush

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.