kiwikid Posted June 20, 2007 Share Posted June 20, 2007 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) Link to comment Share on other sites More sharing options...
DW1 Posted June 20, 2007 Share Posted June 20, 2007 use the class since there is no window name Opt("WinTitleMatchMode", 4) AutoItSetOption("WinDetectHiddenText", 1) $var = ControlGetText("classname=Shell_TrayWnd", "", 304) MsgBox(0, "Start Button Text", $var) did that work for you? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
kiwikid Posted June 20, 2007 Author Share Posted June 20, 2007 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. Link to comment Share on other sites More sharing options...
kiwikid Posted June 20, 2007 Author Share Posted June 20, 2007 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? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now