Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: manipulating window positions on Win7

by dasgar (Priest)
on May 15, 2015 at 05:06 UTC ( [id://1126730]=note: print w/replies, xml ) Need Help??


in reply to manipulating window positions on Win7

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.

  • Comment on Re: manipulating window positions on Win7

Replies are listed 'Best First'.
Re^2: manipulating window positions on Win7
by LanX (Saint) on May 15, 2015 at 11:05 UTC
    Thanks for the links. :)

    Yes I plan to also run an instance on the WTS, possibly connected to a hot key such that I can trigger it from my client.

    I agree, I'll certainly try to avoid any mouse clicks, at best some scrolling.

    Most applications allow automation by hotkeys, triggering them should be sufficient for me.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1126730]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found