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:
Jamal MazruiSubject:
Beta 0.8 of GrabText releasedDate:
Wed, Mar 31, 2010 4:44:52 pmhttp://EmpowermentZone.com/gtsetup.exe
Many bug fixes and feature enhancements have been made since the last
release. Besides the command line and dialog interfaces, GrabText is now
a COM server as well. It may be instantiated by almost any COM automation
client using the "Grab.Text" ProgID. At the end of the installation
process, checkboxes offer options to install JAWS or Window-Eyes script
packages that demonstrate this COM server in Notepad. Another checkbox
will open Notepad with a demo file containing a few lines of text.
Position the caret and mouse pointer on different parts of the text. Then
press F1 to initialize the GrabText object, and F2 through F8 to grab
different areas of text. F9 grabs them all and copies the result to the
clipboard so you can paste and examine it. Also try other dialogs of
Notepad that have more controls, e.g., the file open dialog. Press
Shift+F1 to close the GrabText object.
The GrabText installer puts a COM server in the Global Assembly Cache
(GAC) of the .NET Framework. To instantiate it as a COM object, pass
"Grab.Text" as a parameter to the CreateObject function, or equivalent, of
the programming language you are using. Methods of the object are listed
in the documentation excerpt below, grouped into the following categories:
grab, window handle, window coordinate, point coordinate, directory, and
miscellaneous. The initial letter of a variable name indicates its data
type: boolean, integer, string, or general variant.
Please note that, although the current demos use screen reader scripting
languages, the text is extracted from the screen in a manner completely
independent of the screen reader in use.
Grab methods:
sText = GetTopLevelWindowText(iHandle)
sText = GetActiveWindowText()
sText = GetFocusControlText()
sText = GetMouseControlText()
sText = GetControlTextFromHandle(iHandle)
sText = GetControlTextFromPoint(iX, iY)
sText = GetRectangleText(iLeft, iTop, iRight, iBottom)
sText = GetCaretClip()
sText = GetMouseClip()
sText = GetClip(iX, iY)
sText = GetCaretCharacter()
sText = GetMouseCharacter()
sText = GetCharacter(iX, iY)
Window handle methods:
iHandle = GetActiveWindow()
iHandle = GetFocusControl()
iHandle = GetOwnerWindow(iHandle)
iHandle = GetTopLevelWindow(iHandle)
iHandle = GetParentWindow(iHandle)
Window coordinate methods:
iX = GetWindowLeft(iHandle)
iY = GetWindowTop(iHandle)
iX = GetWindowRight(iHandle)
iY = GetWindowBottom(iHandle)
Point Coordinate methods:
iX = GetCaretX()
iY = GetCaretY()
iX = GetMouseX()
iY = GetMouseY()
Directory methods:
sDir = GetProgramDir()
sDir = GetDataDir()
sDir = GetNETDir()
Miscellaneous methods:
bValid = Init(sUserName, sLicenseKey)
sName = GetWindowName(iHandle)
bFound = IsScreenReaderActive()
bSpoke = Say(vText)
bResult = SetActiveWindow(iHandle)
Jamal
Many bug fixes and feature enhancements have been made since the last
release. Besides the command line and dialog interfaces, GrabText is now
a COM server as well. It may be instantiated by almost any COM automation
client using the "Grab.Text" ProgID. At the end of the installation
process, checkboxes offer options to install JAWS or Window-Eyes script
packages that demonstrate this COM server in Notepad. Another checkbox
will open Notepad with a demo file containing a few lines of text.
Position the caret and mouse pointer on different parts of the text. Then
press F1 to initialize the GrabText object, and F2 through F8 to grab
different areas of text. F9 grabs them all and copies the result to the
clipboard so you can paste and examine it. Also try other dialogs of
Notepad that have more controls, e.g., the file open dialog. Press
Shift+F1 to close the GrabText object.
The GrabText installer puts a COM server in the Global Assembly Cache
(GAC) of the .NET Framework. To instantiate it as a COM object, pass
"Grab.Text" as a parameter to the CreateObject function, or equivalent, of
the programming language you are using. Methods of the object are listed
in the documentation excerpt below, grouped into the following categories:
grab, window handle, window coordinate, point coordinate, directory, and
miscellaneous. The initial letter of a variable name indicates its data
type: boolean, integer, string, or general variant.
Please note that, although the current demos use screen reader scripting
languages, the text is extracted from the screen in a manner completely
independent of the screen reader in use.
Grab methods:
sText = GetTopLevelWindowText(iHandle)
sText = GetActiveWindowText()
sText = GetFocusControlText()
sText = GetMouseControlText()
sText = GetControlTextFromHandle(iHandle)
sText = GetControlTextFromPoint(iX, iY)
sText = GetRectangleText(iLeft, iTop, iRight, iBottom)
sText = GetCaretClip()
sText = GetMouseClip()
sText = GetClip(iX, iY)
sText = GetCaretCharacter()
sText = GetMouseCharacter()
sText = GetCharacter(iX, iY)
Window handle methods:
iHandle = GetActiveWindow()
iHandle = GetFocusControl()
iHandle = GetOwnerWindow(iHandle)
iHandle = GetTopLevelWindow(iHandle)
iHandle = GetParentWindow(iHandle)
Window coordinate methods:
iX = GetWindowLeft(iHandle)
iY = GetWindowTop(iHandle)
iX = GetWindowRight(iHandle)
iY = GetWindowBottom(iHandle)
Point Coordinate methods:
iX = GetCaretX()
iY = GetCaretY()
iX = GetMouseX()
iY = GetMouseY()
Directory methods:
sDir = GetProgramDir()
sDir = GetDataDir()
sDir = GetNETDir()
Miscellaneous methods:
bValid = Init(sUserName, sLicenseKey)
sName = GetWindowName(iHandle)
bFound = IsScreenReaderActive()
bSpoke = Say(vText)
bResult = SetActiveWindow(iHandle)
Jamal




