Kenny Brown
Kenny Brown

Reputation: 33

Obtaining class names of buttons

I use Excel VBA to automate an external program (so our technicians only have to press one button to set the settings of the program for their job).

I can find class names for windows, but neither WinID nor Window Detective show a class name for containing buttons. Is there a way to obtain these so I can automate clicking them? There are five buttons, but hoovering over each only returns information for its parent window.

Upvotes: 3

Views: 906

Answers (1)

Santosh
Santosh

Reputation: 12353

AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general purpose scripting.

It comes with the AutoIt Window Info Tool (\AutoIt3\AU3Info.exe) which allows you to get information from a window (that can be used to automate it), which includes:

  • Window titles
  • Text on the window (visible and hidden)
  • Window size and position
  • Contents of the status bar
  • Position of the mouse pointer
  • Colour of the pixels underneath the mouse pointer
  • Details of the control underneath the mouse pointer

enter image description here

Upvotes: 4

Related Questions