Sign in to follow this  
Followers 0
Surgery

ControlClick issues

4 posts in this topic

Posted this in the "i'm too stupid" thread too, but thought I'd make my own thread with a more descriptive title.

my code:

ControlClick("[CLASS:#32770]", "", "[CLASSNN:SysTreeView321; ID:1439]", "", "", "31", "201")

And nothing is happening. I position my mouse at those coordinates and click and it works, but the automation does not.

Share this post


Link to post
Share on other sites



sorry I don't have nearly enough Experience yet.


Share this post


Link to post
Share on other sites

Sometimes programs use phony controls that are really placeholders for custom controls which don't play nice with Autoit, so even though you send a click, it might not register. I believe in the case of .NET applications there is a UDF for trying to control them.

Also sometimes programs will not properly register a control click if the window is minimized, or doesn't have focus, or if the control doesn't have focus.

The first step might be to see if the script is properly sending out the click (even if the target program isn't recognizing it), then you know if your window and control IDs are correct

$Success= ControlClick("[CLASS:#32770]", "", "[CLASSNN:SysTreeView321; ID:1439]", "", "", "31", "201")

Switch $Success
    Case 0
        MsgBox(16,"Autoit","ControlClick Failed")
    Case 1
        MsgBox(0,"Autoit","ControlClick Success")
EndSwitch

Worst case you could locate the control, then feed mouseclick commands

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Posted this in the "i'm too stupid" thread too, but thought I'd make my own thread with a more descriptive title.

my code:

ControlClick("[CLASS:#32770]", "", "[CLASSNN:SysTreeView321; ID:1439]", "", "", "31", "201")

And nothing is happening. I position my mouse at those coordinates and click and it works, but the automation does not.

Surgery,

Here is my submission to you to see if it works.

; Assuming "#32770" is the class of the window that the control is in.
ControlClick(WinGetTitle("[Class:#32770]"), "", "SysTreeView321", "left", 1, 31, 201)

Edit: Just looked at

http://www.autoitscript.com/forum/index.ph...st&p=622216

If above does not work try

ControlClick("", "", "SysTreeView321", "left", 1, 31, 201)

Your ControlClick parameters for Button and Number of clicks you have as no button to use and no number of clicks.

The default parameters are used when no parameter is entered, but you are using "" as the parameter.

Edited by Malkey

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