Michael asked for this but others may be interested to file the answer away.

Dear Michael,

Below is the outline to create a script to locate a graphic.
:

1. first determine in which window the graphic is found, eg the RealWindow,
the focus window, the app main window, etdc.
2. determine the search direction and range, ie from top (use s_top), from
bottom (use s_bottom), and the range, (restricted or unrestricted,
s_restricted or s_unrestricted) restriction refers to whether the search
only looks at the immediate window supplied or whether it looks at child
windows as well.
3. You can assign a keystroke to the script or leave it as a function and
have another function call it.   
4. using this window, the script needs to do the following:
script FindMyButton()
var
handle TheWindow, ; window handle of starting point
string theGraphicName ; name of graphic to find

; assume we want to find a graphic in the real window
; remember, real window is a window with a title
; need to get focus first and then real window 
; relative to focus:\
let TheWindow=GetRealWindow(GetFocus())
let TheGraphicName="my button"
if FindGraphic(theWindow, theGraphicName, s_top, s_unrestricted) then
        sayString(theGraphicName)
        leftMouseButton() 
else
        SayString(theGraphicName+" not found.")
endIf
endScript

At 08:51  16/02/99 -0600, you wrote:
>Hi Joseph:  You helped me with this once before, and now I've lost the
>script I was using.  Try as I might, I can't piece this together.  
>I want to write a script to find a particular graphic and have the left
>mouse button used to click it.  Can you refresh my memory?
>Thanks so much.
>
>Michael
>
>Michael Barber
>(515) 281-1391
>Work Email:  [EMAIL PROTECTED]
>
>
>

Joseph Dunn
Adaptive Technology Specialist

Royal Society for the Blind of South Australia Inc.
230 Pirie Street 
Adelaide  SA  5000
Australia

Tel: +61 8 82322444
Fax: +61 8 82322111
E-mail: [EMAIL PROTECTED]
WWW: http://www.rsb.org.au


-
Visit the jfw ml web page: http://yoyo.cc.monash.edu.au/~nallan/jfw

Reply via email to