[jawsscripts] Toolbar list Script

  • From: "Dean Masters" <dwmasters@xxxxxxxxxxxxx>
  • To: "JAWS Scripts" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 17 Sep 2008 20:41:09 -0400

Here is the script written by JAWS to get a list of the graphics in the main 
toolbar. I don't understand how it knows where the toolbar is. could someone 
explain this to me? I have a program where I use this script for the regular 
toolbar but there is another toolbar which I would like to write another 
script for which gets the graphics in that toolbar but can't figure out how 
to tell this script where that other toolbar is.

Script ToolBarList ()

var

int nIncludeGraphics,

int nIndex,

int nRowToClick,

int nColToClick

Refresh()

Delay(10)

PCCursor ()

let nIncludeGraphics = GetJcfOption(OPT_INCLUDE_GRAPHICS)

SetJcfOption (OPT_INCLUDE_GRAPHICS, 1) ; labeled graphics only

let g_strGraphicsList = ""

let g_strGraphicsListX = ""

let g_strGraphicsListY = ""

GraphicsEnumerate(GetAppMainWindow(GetFocus()),"GraphicsListHelper")

; remove leading delimiters

let g_strGraphicsList =stringChopLeft(g_strGraphicsList,1)

let g_strGraphicsListX = stringChopLeft(g_strGraphicsListX,1)

let g_strGraphicsListY =stringChopLeft(g_strGraphicsListY,1)

SetJcfOption (OPT_INCLUDE_GRAPHICS, nIncludeGraphics)

if (g_strGraphicsList) then

let nIndex = DlgSelectItemInList (g_strGraphicsList,TBLDialogTitle, FALSE);

;SayInteger(nIndex)

if (nIndex == 0) then

return

endIf

let nRowToClick =

StringToInt(StringSegment(g_strGraphicsListX,LIST_ITEM_SEPARATOR,nIndex))

let nColToClick =

StringToInt(StringSegment(g_strGraphicsListY,LIST_ITEM_SEPARATOR,nIndex))

SaveCursor()

JawsCursor()

MoveTo(nColToClick,nRowToClick)

Delay(10)

LeftMouseButton()

;SayInteger(nColToClick)

;SayInteger(nRowToClick)

Else

SayFormattedMessage (OT_ERROR, cmsgNoGraphics1_L, cmsgNoGraphics1_S)

RestoreCursor ()

endIf

EndScript



Thanks,

Dean


__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: