Jump to content

Recommended Posts

Posted (edited)

Hi guys, I have another question about control click. What do I do when my window doesn't have a title?

What's happening is, in the program I'm automating (autocad), the drop down menu's window doesn't have a title.

The button I'm trying to click on has this information:

>>>> Window <<<<

Title:

Class: MenuPane

Position: 95, 260

Size: 215, 206

Style: 0x96000000

ExStyle: 0x00000008

Handle: 0x00060C0C

>>>> Control <<<<

Class: MenuPane

Instance: 1

ClassnameNN: MenuPane1

Name:

Advanced (Class): [CLASS:MenuPane; INSTANCE:1]

ID:

Text:

Position: 3, 3

Size: 209, 200

ControlClick Coords: 99, 18

Style: 0x56000000

ExStyle: 0x00000008

Handle: 0x002A0BFC

So I found out you could click on something via handle but that doesn't appear to be working either.

My code:

;opens the menu pane

ControlClick($sAppTitle,"","[CLASS:Layout; INSTANCE:27]","left",1,13, 18)

;now clicks the button on the menu pane

$handle = WinGetHandle("classname=MenuPane")

ControlClick($handle,"","[CLASS:MenuPane; INSTANCE:1]","left",1,68, 7)

Thank you,

Athos

Edited by Athos
Posted

Use the advanced as shown in the help file example for controlClick().

In your autocad example this would be.

ControlClick ( " [CLASS:MenuPane; INSTANCE:1]", "", Enter contolid here  )

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Posted (edited)

I was going to say that didn't work, but now I see the problem and it works perfectly!

Thanks Bowmore!

Edited by Athos

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...