Sign in to follow this  
Followers 0
Vos

Control Click Help

8 posts in this topic

quick question i have a button with specs.

>>>> Control <<<<

Class: ThunderRT6TextBox

Instance: 12

ClassnameNN: ThunderRT6TextBox12

Name:

Advanced (Class): [CLASS:ThunderRT6TextBox; INSTANCE:12]

ID: 10

Text: Data

Flash

i can click on the button using the code

$windowname = WinGetTitle("[active]")

ControlClick($windowname, "", "[CLASS:ThunderRT6TextBox; INSTANCE:8]")

however the button changes the instance number depending on which screen i am on. The Txt on the button stays the same (Data Flash). Am able to use control click on this button using just the txt? and if i also had buttons with hidden txt could i click on those as well(without using the instance number). please post the text that you think would work, i have tried many different ways and cant seem to do it.

Thanks in advance

Share this post


Link to post
Share on other sites



that doesn't work... does it matter that they are split on two levels?

Data

Flash

The window info text recognizes it as two lines. if so how do i mimic that?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Yes. Doing it this way seems to require the exact control text. Try using the AutoIt Window Info tool. You can copy/paste the exact control text from there into your script to get it to work.

----Edit----

I have only tested this with WinXP SP3. I don't know how well it will work with other OS versions.

Edited by willichan

Share this post


Link to post
Share on other sites

That seems to work for the Hidden txt but not the visible. is there a way to distinguish between?

Share this post


Link to post
Share on other sites

That seems to work for the Hidden txt but not the visible. is there a way to distinguish between?

Try using the 'Summary' tab of the info tool. It will show all of the info at once. Visible text in the '>>>> Visible Text <<<<' section, and hidden in the '>>>> Hidden Text <<<<' section. What you are looking for, however, is in the '>>>> Control <<<<' section next to the 'Text:' tag.

Make sure that you are hovering over the control you want to click, then freeze the display (strl-alt-f) before you copy the control text.

Share this post


Link to post
Share on other sites

what if the Control has a bunch of text lines which show up in the Visible text list, but Window Info can't select them individually? Can you click on an element of the Visible Text list in a control?

Share this post


Link to post
Share on other sites

I am not quite sure what you are referring to. Each line of visible text is not necessarily a different control. You should look in the Control section for the Text tag.

If you are looking in the visible text section, you are seeing text for the window, not just the control you are hovering over.

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