Hi Randy,
Give this a try.
These scripts need to be added to the JFW.jss file, and the Alt+Tab
keystroke needs to be assigned to the MoveToDesktop() script.

What these two scripts do:
With 3.3, there is a problem with the focus getting hung out in limbo when
closing an application,  and there are no Moore apps open.  It should take
focus to the JAWS window, but it doesn't quite get there.  When this
happens, a single LeftMouseButton will force the focus to the Desktop when
it isn't either on the JAWS window, or the Desktop.  This "limbo" returns
some pretty unique window information, and since the active script file at
that time is the JAWS window's script file, placing the routine that checks
for this unique information in the JFW.jss' AutoStartEvent function seems
the most sensible place for it.
The info returned, (according to HomeRow), are values such as "-1" for the
Type Code, and the same for the SubType Code,  "0" for the Control Id, and
nothing for either TopLevel, Parent, or Child windows names, as well as no
handle for the current window.  This extremely odd set of values gives the
script something unique enough to search for, with little or no chance of
having it execute when it isn't needed!
If the values I'm checking for are present when the JAWS window becomes the
active script file, then the AutoStartEvent processes the "Then" part of the
"If/Then" statement, which is a single LeftMouseButton.  This causes the
Desktop to become the active window!
I've tested it several times, but give it a go and see if you see anything
wrong with it.  If so, we've still got some of those unique returned values
we can use to restrict it further.

The second script seems to take care of not being able to Alt+Tab to the
Desktop from the JAWS window.  When you are in the JAWS window, and there
are no more apps open, the Alt+Tab just does nothing.  The MoveToDesktop()
script, (when assigned to the Alt+Tab within the JFW.jss script file),
issues an Alt+Tab, and if the JAWS window is still active, checks the
TopLevelWindow, and the Parent window, and the Current window's names, and
if it finds that we are still in the JAWS window, issue a MinimizeAllApps()
to place you on the Desktop!

These should work good enough for the task while HJ finds the root of the
problem and fixes it internally.


Cut and past the following scripts to the JFW.jss script file, and then
assign the MoveToDesktop() to the Alt+Tab key within the JFW.jss script
file.

; This function gets launched as soon as the JAWS window becomes active.
function AutoStartEvent()
;This routine is a temporary fix for JFW 33025 getting lost when
; closing apps and JFW is the only thing on TaskBar.
; It has enough conditional statements to ensure it only gets executed
; when this particular focus loss occurs.

If(GetWindowTypeCode(GetCurrentWindow()) == -1) &&
(GetWindowSubTypeCode(GetCurrentWindow()) == -1) &&
(GetControlID (GetCurrentWindow ()) == 0) Then
; If  this unique info is returned, then click the left mouse button
; to get focus placed on the Desktop.
LeftMouseButton()
EndIf
EndFunction

Script MoveToDesktop ()
; This script allows the Alt+Tab keypress to move to the Desktop
; whenever JAWS is the only open item on the TaskBar.
{Alt+Tab}           ; issue an Alt+Tab to move to next opened app.
If(GetWindowName(GetTopLevelWindow (GetCurrentWindow ())) == "JAWS" &&
(GetWindowName(GetParent(GetCurrentWindow ())) == "JAWS") &&
GetWindowName(GetCurrentWindow()) == "") Then
; Hey!  I just hit Alt+Tab and I'm still in the JAWS window, so
; I'll just use the following command to get to the Desktop!
MinimizeAllApps ()
EndIf
; If it isn't still the JAWS Window, then act normal!
EndScript



Hope this helps!

Thanks,
Dennis Brown, [EMAIL PROTECTED]
Visit the Blind Programming site at http://www.mindspring.com/~brown99/



-
Visit the jfw ml web page: http://jfw.cjb.net

Reply via email to