To expand a bit, Win32::GuiTest includes the spy.pl and spy--.pl scripts, which dump the structure of available windows. If you can find the "RESET" button through this, you can automatically click it and then restore the focus to the original window. My advice is to not send mouse clicks but to use keyboard navigation/hotkeys or to send window messages with the ID of the target control to activate it. Be sure to log all the actions of your assisting program to a file so you can find what situation caused the program to act unexpectedly, later.

If the application does paint its own controls, such as to have "fancy" buttons (for no good reason), you will have to take screenshots and compare the screenshots, which also can work but is fragile if the font or screen scale changes.

Another low-effort thing to try is AutoHotkey, which has its own quirky programming language. I wouldn't want to write any form of logic in it, but if AutoHotkey can do it then you can later replicate the mechanism AutoHotkey uses with Perl.


In reply to Re^2: Assist human unobtrusively in a 3rd party Windows GUI by Corion
in thread Assist human unobtrusively in a 3rd party Windows GUI by Marshall

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.