Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Automating a Win10 GUI

by Marshall (Canon)
on Jan 26, 2020 at 08:07 UTC ( [id://11111906]=note: print w/replies, xml ) Need Help??


in reply to Re: Automating a Win10 GUI
in thread Automating a Win10 GUI

There are a whole bunch of automation programs. One person suggested AutoHotKey. I am open to any solutions. My initial testing with Win32::GuiTest indicates that this can be a lot more complicated than it sounds.

Replies are listed 'Best First'.
Re^3: Automating a Win10 GUI
by bliako (Monsignor) on Jan 26, 2020 at 10:28 UTC

    I had a positive experience with Win32::GuiTest. If you want to go this way start by getting a handle to the window you are interested in. The manual shows this: my @found = FindWindowLike(0,"title-regex");. And the t/01_basic.t test script does it this way:

    # Create a notepad window and check we can find it system("cmd /c start notepad.exe \"README\""); my @waitwin = WaitWindowLike(0, "readme|README", $class_re); is(@waitwin, 1, "There is one notepad open with README in it"); my @windows = FindWindowLike(0, "readme|README", $class_re); is(@windows, 1, "The same from FindWindowLike"); is($waitwin[0], $windows[0], "The two windows are the same"); # Find the edit window inside notepad my $notepad = $windows[0]; my @edits = FindWindowLike($notepad, "", "Edit"); is(@edits, 1, "Edit window found within notepad");

    I do not have any experience with the AutoIt3,that harangzsolt33 suggested, nor with AutoHotKey. I am sure they will do the job equally well. However, an all-Perl solution has benefits. The tricky part, recalling from my experience, is to wait for the windows to show and then make sure that the usual windows blabbering via popups will not get in the way of what window focus and arrangement you want.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found