[jawsscripts] Re: To Script, or Choose Another Application?

  • From: Steve Matzura <number6@xxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 09 Jul 2010 01:28:31 -0400

Hi, Jeff:

It wasn't anything particularly sophisticated. I knew, for example,
that the window for which I desired the handle was two windows to the
left of the window that got focus as soon as the program opened.  I
figured this out by inspection using the Home Row Utility.  So I
simply wrote a script called AutoStartEvent, takes no parameters, I
declared a global handle variable and use it in a nested call to
GetPriorWindow, like this:

Globals Handle hwnd

void Function AutostartEvent ()

let hwnd = GetPriorWindow(GetPriorWindow(GetFocus()))

EndFunction

; Note, I could also have done it with a while loop. I was just lazy. 
Script ReadDiskUsage ()

SayWindow (hwnd, 0)

EndScript

Because the AutoStartEvent runs when the program starts, the focus is
on a  known object, so I tell JAWS where to start walking the window
list with GetFocus(), which gives its value up to the first
GetPriorWindow() call, which gives its value up to the outermost
GetPriorWindow() call.  The equivalence assigns the returned value to
the global handle variable hwnd, which I can use at any time to read
the desired window when the hot key assigned to the ReadDiskUsage
script is pressed.  Only problem was that the window in question
wouldn't read anything, even though I could find it with the JAWS
cursor and get the control ID of it so I could get the handle of it.
The code, though, is sound, because I tested it to get the contents of
other windows, and it does just what I said--goes backwards two
windows and stores the handle in a global variable.

Hope this helps.

On Fri, 9 Jul 2010 14:57:24 +1000, you wrote:

>Steve, you mentioned in one of your earlier posts about this prob though, 
>that you had what you regarded as a "fool-proof" method, of identifying 
>correct window, via some funky sounding idea of tooling through things using 
>next/prior windows, to somehow map the handles of the current session, to 
>enable you to easily uniquely grab the window you wanted, where control ID's 
>were not unique, but the same as handles all the time?
>
>would you mind please, posting that code up here? coz I'm working with an 
>app which does exactly that as well, and I sure don't yet have the knowledge 
>to construct code such as you describe? and would rather like to?
>
>thanks.
>
>geoff c.
>
>
>----- Original Message ----- 
>From: "Steve Matzura" <number6@xxxxxxxxxxxxx>
>To: <jawsscripts@xxxxxxxxxxxxx>
>Sent: Friday, July 09, 2010 2:14 PM
>Subject: [jawsscripts] Re: To Script, or Choose Another Application?
>
>
>> Been down that road, but I'll try it again just to make sure there
>> wasn't something I missed.  Check out the audio and disc burners from
>> DVDVideosoft.  Everything on them is a real Windows control except the
>> window where the disk space usage is displayed.  For some reason, it
>> just plain doesn't speak when told to.
>>
>> On Thu, 8 Jul 2010 20:35:47 -0400, you wrote:
>>
>>>express burn / express rip by nch.com.au
>>>
>>>----- Original Message ----- 
>>>From: "Chris Smart" <chris_s@xxxxxxxxxxxx>
>>>To: <jawsscripts@xxxxxxxxxxxxx>
>>>Sent: Thursday, July 08, 2010 7:42 PM
>>>Subject: [jawsscripts] Re: To Script, or Choose Another Application?
>>>
>>>
>>>Have you tried Nero?
>>>
>>>__________�
>>>
>>>View the list's information and change your settings at
>>>http://www.freelists.org/list/jawsscripts
>>>
>>>
>>>__________�
>>>
>>>View the list's information and change your settings at
>>>http://www.freelists.org/list/jawsscripts
>>>
>> __________�
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>> 
>
>__________�
>
>View the list's information and change your settings at 
>http://www.freelists.org/list/jawsscripts
>
__________�

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

Other related posts: