Jump to content
Sign in to follow this  
jazs

ControlClick Coords

Recommended Posts

jazs

Could someone give me a little insight on how to use this with a mouse click.. I have a program that I am trying to automate and the only way I can control a button on it is by using "ControlClick Coords:" Any help would be appreciated.

Share this post


Link to post
Share on other sites
dbzfanatic

So you want...what now? Your question is a bit confusing so would you clarify exactly what you want? Do you want to use a MouseClick() for the button or do you want to use ControlClick()?

Share this post


Link to post
Share on other sites
jazs

ControlClick Coords: 10, 6. This is what I am actually trying to figure out how to use.

Edited by jazs

Share this post


Link to post
Share on other sites
dbzfanatic
jazs

ControlClick ("Sym 000 - Episys - PC Transfer", "", [,left [,1 [,11 [,10 ]]]])

^

This is what I'm trying to use and it keeps giving me an error at the first open bracket.

ControlClick ("Sym 000 - Episys - PC Transfer", "", [

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Edited by jazs

Share this post


Link to post
Share on other sites
NeilApp

ControlClick ("Sym 000 - Episys - PC Transfer", "", [,left [,1 [,11 [,10 ]]]])

^

This is what I'm trying to use and it keeps giving me an error at the first open bracket.

ControlClick ("Sym 000 - Episys - PC Transfer", "", [

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

What you are looking for would be:

ControlClick ("Sym 000 - Episys - PC Transfer", "", $controlID,left ,1 ,11,10)

The square brackets in the help file just signify optional parameters.

To get the $controlID value, use AU3Info (comes with SciTE)

Share this post


Link to post
Share on other sites
jazs

ControlClick ("Sym 000 - Episys - PC Transfer", "", $controlID 59392,left ,1 ,11,10) Here is the controller ID. I have tried it every way I can think of and it still doesn't work.. Any help would be appreciated.

Share this post


Link to post
Share on other sites
BrettF

Amazing how many people read the help file these days.

Every time I see people trying to put the [ brackets in I know they haven't got very far.

Many functions contain optional parameters that can be omitted. If you wish to specify an optional parameter, however, all preceding parameters must be specified!

For example, consider Run ( "filename", ["workingdir" [, flag]] ). If you wish to specify the flag, you must specify a workingdir

Share this post


Link to post
Share on other sites
bouncingmolar

ControlClick ("Sym 000 - Episys - PC Transfer", "", $controlID 59392,left ,1 ,11,10) Here is the controller ID. I have tried it every way I can think of and it still doesn't work.. Any help would be appreciated.

I think if you're putting "$controlID 59392" in place of the $controlID then you might be entering the controlID wrong.

When you look at the Control tab in the AutoIt v3 Window Info program (in your Autoit folder in your start menu) and hold the cursor over the control you are trying to manipulate . Copy the entry next to the ClassnameNN and replace it for the ControlID in the example below which was copied from the autoit help file which is a very good read. I've learnt alot from it about basic stuff like entering functions correctly.

ControlClick ( "title", "text", controlID , button , clicks , x , y)

Share this post


Link to post
Share on other sites
bouncingmolar

The other thing you will see when you read the help file, is that when you choose which mousebutton to click with you need to type it in quotation marks. ie "left" not just left by itself

Share this post


Link to post
Share on other sites
bouncingmolar

Nope. Didn't work.. Thanks anyways

copy what you typed and tell us what you did so we can see what you're doing wrong. otherwise noone can help.

Share this post


Link to post
Share on other sites
jazs

Here is a screenshot.

Posted Image

When this button is clicked another window opens. The only way that I know how to automate this feature is by using the controlclick function. However, everything I try is not working.

Edited by jazs

Share this post


Link to post
Share on other sites
bouncingmolar

Jazs thanks for the screenshot its better than nothing. It seems you have not tried either of my suggestions in that screenshot.

This is going to be very slow... as you havn't followed my suggestions so what I suggest you do (apart from reading the help file) is do one step at a time.

1. use the autoit info tool to find the ControlID:...... do this by clicking the "CONTROL TABL" on the autoit info tool.... the tab you have opened on your screenshot is not the Control Tab, but the Summary tab

Once you have done that tell us what the Tab Says before you try out the code.

Thanks.

Please read in the Autoit Help file: Autoit/UsingAutoIt/Controls

Share this post


Link to post
Share on other sites
bouncingmolar

Actually... before you do that I can see in your screenshot that

ClassNN: ToolbarWindow325

That is the info you need.

If you read the Autoit Help file: Autoit/UsingAutoIt/Controls you would know that ClassNN is one of many properties that can be used to identify the controlID.

You would also know if you did the tutorials on this helpfile page how to enter them correctly.

However what you need to do it insert the ClassNN into your script. ie.... swap $controlID 93983whateveritwas to "ToolbarWindow325"

you also need to read my post 2 posts ago about choosing which button to click.

no need to screenshot... just copy your code to tell us which part of these suggestions you have followed.

Share this post


Link to post
Share on other sites
jazs

.. I missed the "" going around the left.

Thanks for all of your help.

Share this post


Link to post
Share on other sites
bouncingmolar

.. I missed the "" going around the left.

Thanks for all of your help.

cool no worries I hope you got it working.

Just incase it should look something like : (maybe with different coordinates at the end)

ControlClick("Sym 000-Episys - PC Transfer", "","ToolbarWindow325", "left", 1, 9, 8)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.