Beta 0.8 of GrabText released

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: gw-scripting@xxxxxxxxxxx, JAWSScripts@xxxxxxxxxxxxx, ProgrammingBlind@xxxxxxxxxxxxx, Program-L@xxxxxxxxxxxxx
  • Date: Wed, 31 Mar 2010 16:44:52 -0400 (EDT)

http://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

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

Other related posts:

  • » Beta 0.8 of GrabText released - Jamal Mazrui