Skip Menu |
 

This queue is for tickets about the Win32-GuiTest CPAN distribution.

Report information
The Basics
Id: 132031
Status: open
Priority: 0/
Queue: Win32-GuiTest

People
Owner: Nobody in particular
Requestors: billbarrett04 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Win32::GuiTest bug
Date: Sat, 29 Feb 2020 09:37:06 -0800
To: bug-Win32-GuiTest [...] rt.cpan.org
From: William Barrett <billbarrett04 [...] gmail.com>
Download (untitled) / with headers
text/plain 2.2k
*I am trying to use Perl's Win32::GuiTest on a Windows 10, 64 bit, application - the VLC media player.* *See vsnap.pl <http://vsnap.pl>, attached to this email.* *Failure of MouseClick.* You need to adjust line 96 to point to a current version of VLC, from VideoLAN. This is a VLC media player. You don't need media to see this bug, but you ought to install this product to exhibit the bug. This program runs with the VLC utility as a second forked task. Perl, v5.26.0. My Windows is version 10.0.18363 build 18363. Dell Inspiron 518, x64-based PC Desktop. Details available on request. These functions seem to work as advertised: WaitWindow, to acquire control of a window GetWindowRect, to get the size of the window SetFocus, to bring top focus to a window ClientToScreen, to position the mouse in the window, where there is a hidden button. * However, MouseClick fails.* This function has many parameter variations, but the one I'm using is a windows reference returned from WaitWindow. This reference, a Perl array, seems to work in GetWindowRect and ClientToScreen, with index 0. I call the latter to verify the calculation of screen coordinates from a panel coordinates. The MouseClick (line 132 in the attached program file) fails. When you run this code, you should see the cursor positioned on what is labeled as a Video button near the top of a Simple Preferences window. A left mouse click should change this window into one that shows Video Settings.. Try it yourself. But it does not through this code. Run my code, with a break at line 137, and you will see it crashes in line 138 from no Video Settings window found. That new window never appears. *Could you repair this function, please?* I have not tried all the other functions that use a mouse click in your library, but I have tried many variations on MouseClick, which should work with just the active window reference and the current mouse position, which you can see when you run my program. MouseClick gets what should be a valid window address, assumes the current mouse position, and a left mouse click. But it does nothing and also does not generate a failure. -- William Barrett 408 960 5839 billbarrett04@gmail.com https://www.wbarrett.online
Download vsnap.pl
text/x-perl 4.4k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 1.3k
Hi William, I read your mail 3 times and I still am not sure what exactly you want to accomplish here. Sorry for that. My best guest is that you want to click on "Video Setting" button, and that doesn't work for you? If that assumption is correct, here's what I found. First, instead of Win32::GuiTest::MouseClick($simplePrefs[0]); which I commented, I uncommented SendMouse("{LEFTCLICK}"); # !!! this does NOT work (after sleep(5)), and surprise, it does work. Second, I agree that MouseClick is a little horrible piece of code that I inherited from previous maintainers, but however horrible it is, in this case it seems to be working as expected, ie looping over immediate child windows from the VLC setting window, finding none, and aborting. I was curious how come that a setting windows with dozens of buttons etc has no children, suspecting a bug, and fired up a spyxx.exe, which to my surprise confirmed that the setting window indeed has no children. It seems that Qt that was used to write the application, does not rely on system windows, and thus there's a single HWND responsible for the entire interface. So I'm not sure what kind of help I can provide. On the side note though, if all you need is to grab something from a movie, I would personally recommend ffmpeg.exe that has hundreds of command line switches, and I'm fairly sure can dump frames in pngs. Regards, Dmitry


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.