[jawsscripts] Re: A jaws scripting question.

  • From: Jackie McBride <abletec@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 20 Aug 2015 19:05:31 -0700

U don't wanna use handle, Rishi, as those change w/each program run. U
may also need to check Control ID, because these, too, have started to
change w/each run of the program, especially if it's written in .net.

The general outline for such a script is to find the handle of the
window in question, often by using functions like
FindDescendantWindow(), FindWindow(), or similar--there are a lot of
ways to do this. Then u try a setFocus() command, which may or may not
work--you'll know it did if u end up in a different window. If not,
then your next option is to try a MoveToWindow() command. These
commands will use the handle of the window u found w/whatever function
u used to find the window.

Here's a really simplistic example using The FindDescendantWindow
command. The control id of the window in this example is assumed to be
1.

Script FindMyWindow()
; ctrl shift jaws key f
var
handle hw

let hw = findDescendantWindow(GetAppMainWindow(GetCurrentWindow(),1)
;finds window starting from the current window
if (hw) then ;handle was found
SetFocus(hw)
endif
EndScript

Let me know if the concepts at least were understandable.

On 8/20/15, Rishi D Mack <minimack_19@xxxxxxxxxxx> wrote:

Hey guys, I hope someone can help me. I want to be able to create a
keystroke to jump from one window using window ID or handle. can you help
me?
I've been trying to do this for a while.
let's say the main window is
0001
and there's two windows with several buttons.
there's
Window_A 0002
Window_B 0003
Window_C 0004

Window_C which is 0004 has two buttons.

play0005
and stop 0006

How can I move to different windows, and then, how can I activate those
buttons by using an activate object or something?
Hope someone's understanding what I'm trying to do.
Thanks, Rishi

__________�

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




--
If the grass is greener on the other side of the fence, there's likely
more fertilizer there
Jackie McBride
Author of the Upcoming Book
“Beyond Baffled: the Technophobe’s Guide to Creating a Website”
www.brighter-vision.com Where Visionaries & Technology Unite
Jaws Scripting training
www.screenreaderscripting.com
__________�

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

Other related posts: