Jump to content

Recommended Posts

Posted

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

post-63539-0-27911100-1312457961_thumb.p

Posted

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

Posted (edited)

  On 8/4/2011 at 11:41 AM, 'mro2 said:

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 by monoscout999
Posted (edited)

  On 8/4/2011 at 6:26 PM, 'monoscout999 said:

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.

  Quote

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.

  On 8/4/2011 at 4:19 PM, 'MPH said:

You distorted your screenshot. That didn't help matters at all.

What more info is required? Edited by mro2

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
  • Recently Browsing   0 members

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