0

I am trying to automatically click a PictureBox control from an old VB6 application using AutoIt. 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?

Anders Lindahl
  • 41,582
  • 9
  • 89
  • 93
  • 2
    I would break out Spy++ to see what messages AutoIt is sending to the PictureBox control, and see how that varies from what you want to actually want to accomplish. – Joe Jordan Mar 26 '11 at 01:12
  • Are you sure MouseClick requires the window point being clicked to be visible? – wqw Mar 26 '11 at 08:24

1 Answers1

1

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.

MarkJ
  • 30,070
  • 5
  • 68
  • 111