Jump to content
Sign in to follow this  
ZiggyStardust

Need some help with ControlClick

Recommended Posts

ZiggyStardust

I have the Window Handle and the Control ID. The Command I am using is:

ControlClick($Handle, "", 59648, "left", 1, 12, 26)

The return codes reflect that it was successful but it doesn't appear to work. I have done both a WinActivate and ControlFocus before doing the ControlClick and still not joy. It is more or less a spreadsheet (but I am goind to have to say the whole spreadsheet is one big control) and all I am trying to do is highlight the first row.

I can't figure out what I am doing wrong. Might it not like the COntrolID? Is there some Advanced Mode reference that might be better to use?

Share this post


Link to post
Share on other sites
Proph

I don't think you can use controlclick in this manner. You may want to try MouseClick. Downside to mouseclick is that you excel window must be focused whereas controlclicks can be used without focus.

Share this post


Link to post
Share on other sites
ZiggyStardust

Thanks Proph. This is where I get a little confused on the documentation and feedback. On this same program I had a mouseclick miss on one computer but work fine on another. I swear when you change Desktop Themes is made a difference one where the mouseclick actually clicked. I posted the problem here and was told that ControlClick is the click of choice. That it was much more accurate and uniform across computers. Hence I am trying to learn how to use control click.

The documentation doesn't really go too far in depth about the differences between the two. Is the only real difference that the mouseclick needs to be focused?

I am also struggling a little AutoitInfo tool. I have been trying to use the ControlID when possible but it seems like sometime the Advanced Mode works better if you can figure out the advanced mode parameters. Still learning ;)

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  

×