Clicking on PictureBox with AutoIt ControlClick fails
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.
精彩评论