I have a complex app that I run on a Windows platform. This app has multiple communication links open to both the internet and also to local (and remote) serial port devices.

There many GUI windows in this application. There are two windows where a "RESET" button can appear. When that happens, I have to move my mouse over there, click on it and then have to click on the window where I was typing in order to bring the typing and F key focus back.

This sounds crazy because it is! The program authors want me to explicitly click on this "RESET" button. I asked, quite sensibly, "If there is no decision for me to make and I always click on this RESET button, and you guys know that a reset is required, why can't you guys just do the reset automatically for me?". Their answer is that they want to force me to be aware that a reset was needed because of possible side-effect X. Geez! The probability of side-effect X happening is directly related to how fast I can click on the RESET button! The only possible corrective action I have is to reset the comm link ASAP.

The RESET button means that a serial port connection has been lost. Side-effect X can happen because current information is not available from the connection that failed. This involves 2 hardware and at least 2 software vendors. Finger pointing is rampant! This error can happen every couple minutes and is a real PITA.

What I want is an application that can as unobtrusively as possible from a user point of view, click on this RESET button. That would mean that I'm entering keyboard text into some window, and "poof" the reset button gets clicked so fast that I am not even aware of it!

I have asked a question similar to this before, but I've been unable to find that thread. The application was different and it was a long time ago. This is not a "test the GUI" application. I want this thing to run in the background and in parallel with normal human GUI interactions.

Update:
I really appreciate the comments and ideas for solutions to my problem!

I had heard about Win32::GuiTest before. I didn't know about the associated program spy.pl.Thanks Grandfather and Corion!

roboticus suggested "AutoHotkey" and that suggestion looks like a very promising avenue to explore. In particular, the "WinWait" function sounds like what I need if I am able to implement that. harangzsolt33 also suggested "Autoit".

When I am using this application, I typically have 15+ distinct windows open on my dual monitor desktop. I actually have to do quite a bit of moving and adjusting of windows in order to see all the stuff that I need to see within the monitor space that I have. The application involves multiple hardware and software vendors. I am "ticked off" that the vendor that presents the "reset button" can't just do the reset themselves! Unfortunately I am in the less than 1% of users who have a setup where this is a problem. So they are not inclined to help me. Sometimes software support is like that.

I hope that with some hacking, I can get this thing to work "like it should work".


In reply to 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.