开发者

Clicking on PictureBox with AutoIt ControlClick fails

开发者 https://www.devze.com 2023-02-19 12:11 出处:网络
I am trying to automatically click a PictureBox control from an old VB6 application using Aut开发者_Go百科oIt. Window Info finds a control with class ThunderRT6PictureBoxDC and ID 15, and AutoIt succe

I am trying to automatically click a PictureBox control from an old VB6 application using Aut开发者_Go百科oIt. Window Info finds a control with class ThunderRT6PictureBoxDC and ID 15, and AutoIt successfully hides it if I run...

ControlHide($class, "", "[ID:15]")

However, when I try to click it using:

ControlClick($class, "", "[ID:15]")

...nothing happens - and @error is unset.

Clicking using MouseClick with the control coordinates works, but then I have to make sure that the window isn't covered by anything.

Does anyone know why nothing happens, and what I can do to workaround without resorting to MouseClick?


I don't know AutoIt, but possibly this is because the control is a PictureBox rather than a button, so Windows doesn't support the concept of a "click" on this control. Can't think of any alternative workaround.

0

精彩评论

暂无评论...
验证码 换一张
取 消