[jawsscripts] Re: Size of windows in pixels, Does Homerow contain a utility?

  • From: "Paul Magill" <magills@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 6 Apr 2011 21:22:47 +1000

Hi Geoff,

- below is a concept/draft script that could be added to the default file to 
provide the capability.

It may be better to add the necessary bits to either, 
ScreenSensitiveHelpTechnical, or  SayActiveCursor to increase their 
information & save adding a keystroke.

Script SayWindowSize ()
VAR

INT WinLeft,

INT WinRight,

INT WinTop,

INT WinBottom,

INT WinWidth,

INT WinHeight,

STRING CursorName

IF NOT GetWindowRect (GetCurrentWindow (), WinLeft, WinRight, WinTop, 
WinBottom) THEN

SayUsingVoice (VCTX_Message, "Failed to get window boundaries", 
OT_No_Disable)

RETURN

ENDIF

LET CursorName = stringChopRight (GetActiveCursorName (), 6) ; remove the 
word 'active' which follows the cursor name returned by the function

LET WinWidth = WinRight - WinLeft

LET WinHeight = WinBottom - WinTop

Say ("Window size at the " + CursorName, OT_No_Disable)

Say (IntToString (WinWidth) + " pixels wide.", OT_No_Disable)

Say (IntToString (WinHeight) + " pixels high.", OT_No_Disable)

EndScript



Regards,
Paul from Aust


----- Original Message ----- 
From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>


Are you thinking of GetWindowRect?  This gives all four dimensions of the
bounding rectangle, and there are also the corresponding functions
GetWindowLeft/Top/Right/Bottom if you only need one of them.  You need to
know the window handle in each case.

  hth Martin

----- Original Message ----- 
From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>


> Hi mighty Scripters.
> Am feeling it would be rather useful, to have a quick method of requesting
> the size of a given window in which one's jaws cursor currently resided?
> I.e. X/Y,  300 by 29 pixels etc.
>
> I'm positive the snowman's jls utilities would have such a feature, but, I
> haven't yet installed or got to grips with that, nor any other script
> exploration utilities like doug's bx Or Jamal's Windig as yet.
> ... I know, total shame on me!
> But, Does anyone know if jaws utility/homerow mode, may already have such
> a builtin feature?
>
> I know one can set the windowRestriction on the fly, with good old
> jawsKey+r, which I've also found a rather quick and useful exploration
> tool, to easily hear what particular text is actually contained within
> it's own separate window, when set to 'current,"
> but, yeah, wondering whether a builtin window size reporting component
> existed?
>
> thanks.
>
> Geoff c.
>

__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: