The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.
From:
Chip OrangeSubject:
RE: class 15 example 3Date:
Thu, Jun 16, 2011 10:03:27 amRight you are Steve; thanks again.
Chip
-----Original Message-----
From: Stephen Clower [mailto:steve@gwmicro.com]
Sent: Tuesday, June 14, 2011 8:09 AM
To: gw-scripting@gwmicro.com
Subject: Re: class 15 example 3
Chip,
Just as an FYI, you can preceed instructions with the @ symbol to cause the
previously active window to regain focus while you're in Immed. Once the
instruction executes, Immed resumes its place in the foreground.
HTH,
Steve
On 6/13/2011 6:16 PM, Chip Orange wrote:
Stephen Clower
Product support specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com
Chip
-----Original Message-----
From: Stephen Clower [mailto:steve@gwmicro.com]
Sent: Tuesday, June 14, 2011 8:09 AM
To: gw-scripting@gwmicro.com
Subject: Re: class 15 example 3
Chip,
Just as an FYI, you can preceed instructions with the @ symbol to cause the
previously active window to regain focus while you're in Immed. Once the
instruction executes, Immed resumes its place in the foreground.
HTH,
Steve
On 6/13/2011 6:16 PM, Chip Orange wrote:
thanks Jeff.
I had my own troubles with this one though; let me warn everyone: be
careful trying this one from inside the immediate app, as the
immediate window itself can block the window you're trying to work
with. at that point, there's really no telling what line (or any of
the text methods will return) when they're blocked. they could return
something valid, or not. and use of the WECursor instead of the mouse
cursor makes no difference if the window is blocked by another.
Chip
----------------------------------------------------------------------
--
*From:* Jeff Weiss [mailto:jnweiss@lwsb.org]
*Sent:* Monday, June 13, 2011 4:29 PM
*To:* gw-scripting@gwmicro.com
*Subject:* RE: class 15 example 3
Sorry Chip!
I found my mistake-and example 3 works just fine!
When all else fails, read the instructions very carefully!
Jeff Weiss
*From:*Jeff Weiss [mailto:jnweiss@lwsb.org]
*Sent:* Monday, June 13, 2011 2:49 PM
*To:* gw-scripting@gwmicro.com
*Subject:* class 15 example 3
I can't get example 3 to work.
I put it in a function with a hotkey and added
Speak sText which I thought should get the current line to speak.
Here is the script:
' OverLapLine
Dim myHotkey : Set myHotkey > Keyboard.RegisterHotkey("Alt-Control-Shift-I","OverLapLine")
' Example 3:
Function OverLapLine()
dim sText
dim oMonitorPosition, oText
dim lineClips
Set oMonitorPosition = WECursor.Position ' property returns x and y
screen coordinants
Set oText = Text
' A copy of the Text root level object is made, into the oText variable.
This is done
' because some of the methods of the Text object keep track of data
(such as the last
' position you used as input to one of it's methods),so that they can
then implement
' functionality such as "previous line". This requires the object to
be able to modify
' itself to store these values, and in such cases, if you don't make a
copy of the
' object (which your script then owns), the copy of the object owned
by WE will not
' allow your script to modify it; therefore, functionality such as
"previous line"
' will not function properly, as the previous position will not be
saved. The MSAAEventSource
' is another such object which may require you to make a copy of it in
order to use
' it fully.
set lineClips = oText.Line(oMonitorPosition)
' the line method actually returns a clips object, and one property of
the clips object
' is the clipsText string, which contains all of the text in all of
the clips, concatenated
' together into one long string.
sText = lineClips.ClipsText
Speak sText
Sleep 200
End Function
Jeff Weiss, CVRT
Rehabilitation Teacher
Lions World Services for the Blind
2811 Fair Park Blvd.
Little Rock, AR 72204
http://www.lwsb.org
The Mission of LWSB is to educate adults who are blind or visually
impaired for careers and independent lives.
--
Stephen Clower
Product support specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com




