[jawsscripts] Word 2010 script

  • From: David Newman <djn@xxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 24 Jun 2012 12:03:24 +0100

 Hello Everybody.
I have a collection of scripts which attempt to make Word 2010 usable.
However, they are not consistently reliable, and it seems extraordinarily
hard to make what I think are very basic script routines work readily,

Below is a stripped down script from one which tries to play with the Word
count window.
This has worked for ages.
Now we have the situation where on 2 laptops, same file, same script, it
always works on one, and never works on the other.
That shrieks timing, but that doesn't seem to be it.

So I'd appreciate any help on what on earth is wrong with such a simple
script.
Word is bad enough without Jaws fighting me !
Thanks

-------

Script yyy ()

var
    handle hwnd,
    int ret,
    string txt

TypeKey("ALT+R")
Pause()
TypeKey("ALT+W")            ;always works, always gets right window
Pause()
Delay(3)                            ;changing to 50 does not help

let hwnd = GetCurrentWindow()
if hwnd then
    let ret = FindString(hwnd,"Pages", S_TOP, S_RESTRICTED)        ;bottom
&unrestricted don't help
    if !ret then
        Say("Can't find pages", OT_BUFFER)
    else
        Say("Found!", OT_BUFFER)
    endif

    let txt = GetListOfObjects(hwnd, ";")                ;prove right window
and can see it all
    CopyToClipboard(txt)

endif

EndScript


__________�

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

Other related posts: