To add to BrowserUk's suggestion of using Win32::GuiTest, you might find a few other pieces of information useful.

At times, you may need to find the ID of a window or a component of a window. Checkout Re: Win32::GuiTest control id for some information on how you can find these details. Alternatively, you should be able to find windows by their title's text and possibly some components by their label's text.

Also, you mentioned using "Windows Terminal Sessions". I'm not sure how successful you will be running Win32::GuiTest code on one system to control GUI applications on a remote system via remote desktop connection. In fact, that's a scenario that I personally would try to avoid doing. I think you'll be more successful if you had the code running on the system whose GUI app(s) that you are trying to control. Even then, there's a few more gotchas to be aware of when trying to do this in a remote desktop session. Checkout Re: How to get handle of a window on desktop (this window is not created by perl code) for more details.

One more thing. It's been a few years since I looked into automating a GUI application and I tried using both Win32::GuiTest and AutoIt. In both cases, I personally found it much easier to control a GUI by sending simulated keystrokes rather than trying to use simulated mouse clicks. In other words, if you can figure out how to drive the GUI app to get it to do what you want it to do using just your keyboard, you can now use that information to drive the GUI app via Win32::GuiTest.

Just thought that I'd pass on some tips and tricks that I learned the hard way.


In reply to Re: manipulating window positions on Win7 by dasgar
in thread manipulating window positions on Win7 by LanX

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.