Sign in to follow this  
Followers 0
kiwikid

Control Text

4 posts in this topic

Real quick question. Without displaying all of my code, here is a snippet that more or less tries to do the same thing. I want to get the text of a control that has focus. In this codes case I want to get the text from the start button. The Window Info tool says the Start Button has "Start" as the text. So why doesn't this work?

AutoItSetOption("WinDetectHiddenText", 1)
$var = ControlGetText("", "", 304)
MsgBox(0, "Start Button Text", $var)

Share this post


Link to post
Share on other sites



use the class since there is no window name

c2--><!--Ck9wdCgmcXVvdDtXaW5UaXRsZU1hdGNoTW9kZSZxdW90OywgNCkKQXV0b0l0U2V0T3B0aW9uKCZxdW90O1dpbkRldGVjdEhpZGRl
blRleHQmcXVvdDssIDEpCiYjMDM2O3ZhciA9IENvbnRyb2xHZXRUZXh0KCZxdW90O2NsYXNzbmFtZT1TaGVsbF9UcmF5V25kJnF1
b3Q7LCAmcXVvdDsmcXVvdDssIDMwNCkKTXNnQm94KDAsICZxdW90O1N0YXJ0IEJ1dHRvbiBUZXh0JnF1b3Q7LCAmIzAzNjt2YXIp
Cg==--><!--eg

did that work for you?

That it did. Thanks for the clarification on that.

Share this post


Link to post
Share on other sites

use the class since there is no window name

c2--><!--Ck9wdCgmcXVvdDtXaW5UaXRsZU1hdGNoTW9kZSZxdW90OywgNCkKQXV0b0l0U2V0T3B0aW9uKCZxdW90O1dpbkRldGVjdEhpZGRl
blRleHQmcXVvdDssIDEpCiYjMDM2O3ZhciA9IENvbnRyb2xHZXRUZXh0KCZxdW90O2NsYXNzbmFtZT1TaGVsbF9UcmF5V25kJnF1
b3Q7LCAmcXVvdDsmcXVvdDssIDMwNCkKTXNnQm94KDAsICZxdW90O1N0YXJ0IEJ1dHRvbiBUZXh0JnF1b3Q7LCAmIzAzNjt2YXIp
Cg==--><!--eg

did that work for you?

To continue down this line of questioning, what command or UDF can I use to find the class name of the window that has focus?

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