Chip,
Thanks very much for this, but I really got confused before. Now going some
steps further with my scripts.
Again many thanks and regards,
  Ralf


Ralf Kefferpuetz * Germany * MSN/Live: [email protected] * Aim:
RalfKatEMC * Skype/Yahoo: rkefferpuetz7747
http://blindpodcast.mypodcast.com

-----Original Message-----
From: Chip Orange [mailto:[email protected]] 
Sent: Sunday, January 24, 2010 8:24 PM
To: [email protected]
Subject: RE: getting the position of the left down corner of a class

 
Hi Ralf,
 
If you look in the help file for the window object's .rectangle property,
you will see it is of type "windowRectangle".  When you go look at the help
topic for the windowRectangle object, you will see it has a property named
screenRectangle, which will give you the converted coordinants for the four
screen points of the corners relative to the screen, rather than the window
(the windowRectangle object actually did have all four corners as it's
properties, not just the two you found, but they of course don't do you any
good directly).
 
If you lookup the screenPoint object's help topic, you'll see that one way
to get it is from the screenPoint method of the application object, and when
you look up this method, you see that you need only to give it a pair of
screen coordinants, which we just figured out how to get above.  you'll also
see it's a root level object.
 
so, something like this perhaps after you get x9:
 
Set sp  = ScreenPoint(x9.screenRectangle.left, x9.screenRectangle.bottom)
Set oMonitorPosition = sp

I think one thing that was confusing to you was that with both window and
screen rectangles, the coordinants of each corner had to be found by
combining two of it's properties, since only one number was specified for
each of the four sides: the left, the top, the right, and the bottom.  so,
the bottom left corner is found by using both the bottom and the left
properties.

hth,

Chip

________________________________

From: Ralf Kefferpuetz [mailto:[email protected]]
Sent: Sunday, January 24, 2010 1:56 PM
To: [email protected]
Subject: getting the position of the left down corner of a class


Hi all,
 
I'm struggling to get a screen point of the left down corner of a class.
Here is an example:
set myGridWindows =
Activewindow.Children.FilterByClassAndModule("TPaintPanel", "")
set x9 = myGridWindows(1).Rectangle
print x9.right
820
print x9.Bottom
412

So, now I know the dimensions of this class in pixel, but how to get the
screen point of the left down corner of this class? I need this point to
start reading the content of the class from bottom to the top Before I used
a fixed point, which might differ from PC to PC and from the status of the
window, like maximized, normal, etc.
This is the screen point I want to get:
Set oMonitorPosition = ScreenPoint(27, 559)
Set myText = Text;
' this speaks 1 line up
Speak myText.priorLine(oMonitorPosition).ClipsText
' this speaks 2 lines up
Speak myText.priorLine.ClipsText
' this speaks 3 lines up
Speak myText.priorLine.ClipsText

Any hint is more than welcome ;)
 
Cheers,
  Ralf
 
Ralf Kefferpuetz * Germany * MSN/Live: [email protected] * Aim:
RalfKatEMC * Skype/Yahoo: rkefferpuetz7747
http://blindpodcast.mypodcast.com


         


Reply via email to