Jump to content

ControlClick Coords


jazs
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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()?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

.. 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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...