mro2 Posted August 4, 2011 Posted August 4, 2011 Hi, can someone explain why this is not working when I specify X or XandY, but it does work when I specify e.g. W, which I don't want since the size of the control/window can vary.... (see also screenshot): $id = "[CLASS:TPageControl; X:210]" $id2 = "[CLASS:TPageControl; W:929]" $h2 = ControlGetHandle("title", "text", $id) ConsoleWrite("h2:" & $h2 & @CRLF) $h3 = ControlGetHandle("title", "text", $id2) ConsoleWrite("h3:" & $h3 & @CRLF) h2: h3:0x00181574
mro2 Posted August 4, 2011 Author Posted August 4, 2011 Alright, brute force has shown that it works for X:1. So I assume coordinates are relative to the CLASS:TPageControl control found. Although there are several instances of such a control. Hmmm....
Bert Posted August 4, 2011 Posted August 4, 2011 You distorted your screenshot. That didn't help matters at all. The Vollatran project My blog: http://www.vollysinterestingshit.com/
monoscout999 Posted August 4, 2011 Posted August 4, 2011 (edited) Hi, can someone explain why this is not working when I specify X or XandY, but it does work when I specify e.g. W, which I don't want since the size of the control/window can vary.... (see also screenshot): $id = "[CLASS:TPageControl; X:210]" $id2 = "[CLASS:TPageControl; W:929]" $h2 = ControlGetHandle("title", "text", $id) ConsoleWrite("h2:" & $h2 & @CRLF) $h3 = ControlGetHandle("title", "text", $id2) ConsoleWrite("h3:" & $h3 & @CRLF) h2: h3:0x00181574 because it`s wrong. What is "Title" and "text"? I never work using the position and size of a control, but maybe This. $h2 = ControlGetHandle("[CLASS:TPageControl;INSTANCE:4]", "", "[CLASS:TPageControl; X:210]") ConsoleWrite("h2:" & $h2 & @CRLF) Edited August 4, 2011 by monoscout999
mro2 Posted August 4, 2011 Author Posted August 4, 2011 (edited) because it`s wrong. What is "Title" and "text"? Well, title and text (well some text, or just "") of the window that contains the control. So I thought. I never work using the position and size of a control, but maybe This. $h2 = ControlGetHandle("[CLASS:TPageControl;INSTANCE:4]", "", "[CLASS:TPageControl; X:210]") ConsoleWrite("h2:" & $h2 & @CRLF) Can't match the Instance ID since each time it's different... I have found no other method to select that control than its position which is unique in the app. You distorted your screenshot. That didn't help matters at all. What more info is required? Edited August 4, 2011 by mro2
monoscout999 Posted August 4, 2011 Posted August 4, 2011 Instance ID from the control is the same always...
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