Sign in to follow this  
Followers 0
WimH

Problem with control click

2 posts in this topic

Hi,

I am using the AutoItX in a C# application. It works great and I have already automated 99% of the stuff I wanted to do. Now, for some strange reason, I am

struggling with the click of a button (In my application, I clicked >100 buttons, and all worked without problems, but for some reason this one is different!?

These are some of the statements I already tried:

au3.ControlClick("AbbeyClone_12072012_205636_deg15.pir - Arta", "", "[iD:1312]")

au3.ControlClick("AbbeyClone_12072012_205636_deg15.pir - Arta", "", "[iD:1312]", "LEFT", 1, 10, 10) // added coordinates because it is a control with 2 buttons for up/down, 10/10 corresponds with the center of the top button

au3.ControlClick("AbbeyClone_12072012_205636_deg15.pir - Arta", "", "[CLASS:msctls_updown32; INSTANCE:6]")

au3.ControlClick("AbbeyClone_12072012_205636_deg15.pir - Arta", "", "[CLASS:msctls_updown32; INSTANCE:6]", "LEFT", 1, 10, 10)

au3.ControlClick("AbbeyClone_12072012_205636_deg15.pir - Arta", "", "[CLASS:msctls_updown32; INSTANCE:6]", "MIDDLE", 1, 10, 10)

All do NOT return "1" (and the button is not clicked of course...)

Any help would be very much appreciated.

Picture of Control (updown control)

--------------------

see attachement

AU3Info

--------

>>>> Window <<<<

Title: AbbeyClone_12072012_205636_deg15.pir - Arta

Class: Afx:00400000:b:00010011:00000006:043301ED

Position: -4, -4

Size: 1928, 1054

Style: 0x15CFC000

ExStyle: 0x00000100

Handle: 0x00020188

>>>> Control <<<<

Class: msctls_updown32

Instance: 6

ClassnameNN: msctls_updown326

Name:

Advanced (Class): [CLASS:msctls_updown32; INSTANCE:6]

ID: 1312

Text:

Position: 1862, 196

Size: 17, 44

ControlClick Coords: 9, 11

Style: 0x50000020

ExStyle: 0x00000004

Handle: 0x00010242

>>>> Mouse <<<<

Position: 1871, 253

Cursor ID: 0

Color: 0x4D6185

control.bmp

Share this post


Link to post
Share on other sites



SOLVED!

Ok, I made a studpid mistake that took me quite long to figure out. The name of the window is "Untitled - Arta" and is only changed to "AbbeyClone_12072012_205636_deg15.pir - Arta" after the file is saved. The save instruction was after the ControlClick command of the updown control...

So statement 'au3.ControlClick("- Arta", "", "[iD:1312]", "LEFT", 1, 10, 10)' now works perfectly (WinTitleMatchMode=2 in my app)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0