Greetings,
I have been working with a client who is using OpenBook 3.5 with JFW 3.2. We noticed
that, after she upgraded from
version 3.0 to 3.5 of OpenBook, the OpenBook window would not come into focus when it
was launched. As a result,
JFW would remain focused on the desktop, or on some other window, even when OpenBook
was open and visible on
the screen. I developed a rather odd solution, and thought I would share it to be
helpful to others with this problem, and
to gain insight on how it might be better solved.
The solution has two parts: a shortcut to the OpenBook icon, and the creation of an
additional JFW script in the default
JFW script file.
Create a shortcut to the OpenBook icon with an attached hotkey. In my client's
particular case, we chose the control-
alt-b command. Here are the general steps:
1.
Open My Computer from the desktop.
2.
Choose the hard drive icon.
3.
Choose the Windows folder.
4.
Choose the Start Menu folder.
5.
Choose the Programs folder.
6.
Press alt-f to pull down the File menu.
7.
Choose New.
8.
Choose Shortcut.
9.
Type the following for its command line:
c:\openbook\openbook.exe
10.
Press enter after the command line has been typed as shown.
11.
Type an appropriate title for its icon, such as "OpenBook".
12.
Press enter to choose the Finish button. The shortcut has been created, and it has
the focus.
13.
Press alt-enter to open the properties for the new OpenBook shortcut.
14.
You should already be on the Shortcut tab. If not, use the control-tab command.
15.
Press alt-k to move to the "shortcut key" field.
16.
Type the keystroke you wish to use, just as though you were using it to execute the
command to launch OpenBook. In
the specific case of this example, the command control-alt-b was used.
17.
Press enter to accept the change and dismiss the dialog. The process is complete.
Now, it is time to add the necessary script code to the end of the default JFW script
file. Here are the general steps:
1.
Press insert-j to open the JAWS window.
2.
Press alt-u to pull down the Utilities menu.
3.
Press s to run the script manager.
4.
Press control-o to access the open dialog.
5.
Type the file name default.jss and press enter. You have the main script file used by
JFW open in the script manager,
where you may edit it to your heart's content. Be very careful! This is the main
script file, the one JFW uses whenever a
script isn't specifically defined in an application.
6.
Press control-end to move to the end of the file. If you are on a blank line, press
enter to create another. If you are not
on a blank line, press enter twice. This will cause one blank line to appear between
the end of the last script, and the
beginning of our new script.
7.
Copy the following script code to your clipboard, and paste it into the script
manager. The code block is separated by
blank lines.
Script RunOpenBook ()
SpeechOff()
MinimizeAllApps()
pause()
{ctrl+alt+b}
delay(100)
{alt+tab}
EndScript
8.
Press control-s to save and automatically compile the default script file, with our
new script included. You should hear
"compile complete". If you get an error message, please make sure you followed these
instructions exactly, and feel free
to contact me if there is a problem.
9.
Close the script manager.
10.
Press insert-j to open the JAWS window.
11.
Press alt-u to pull down the Utilities menu.
12.
Choose the keyboard manager.
13.
Select "default", and press tab to move to the list of scripts.
14.
Select the RunOpenBook script.
15.
Press control-a to add a keystroke.
16.
Type the command you would like to use to launch OpenBook with this script. This is
not the same command as the
one created earlier in these instructions in association with the shortcut to
OpenBook. This is the command you will
actually type to start OpenBook. My client chose to use control-alt-o.
17.
Press enter to accept this change and dismiss the dialog. You have added the
keystroke. Go ahead and press alt-f4 to
close the keyboard manager.
The process is complete. At least, your first attempt is complete, as I will explain
soon. Now, it would be a good idea to
use insert-f4 to unload JFW from memory, then re-run JFW to make sure that the new
defaults have been correctly
loaded and processed. Give this a try. Press control-alt-o to use the new script to
launch OpenBook and force it into
focus. What happened? Is OpenBook correctly focused? Or, is JFW still focused?
Press the insert key on the numeric
keypad. If it is silent, then, unfortunately, JFW still has focus. If OpenBook
starts to scan a page, then it is acting as the
scan key should in OpenBook, and it was a success! If it did not work, please
carefully examine the caveats and notes
listed below.
Caveats:
1.
JFW must go to sleep when OpenBook is started, in order for OpenBook to really run
properly. Copy the file c:
\openbook\utils\openbook.jcf to the c:\jfw32\settings\enu directory.
2.
If you are using the same SSIL speech synthesizer for both JFW and OpenBook, OpenBook
may have problems
running, or it may not speak once it is running. In this case, JFW and OpenBook are
fighting for control of the
synthesizer. Please follow the instructions in the file called newssil.txt in the
c:\openbook directory.
Notes:
The most important statement in the script code is the delay statement. A delay of
100 seems to work reasonably well,
most of the time, on a Pentium 300 MHZ computer. A delay of 130 worked on a Pentium
233 MHZ computer. You may
need to adjust this value until the script produces the desired results. Please, if
you know of a better way to really solve
this problem, I am all ears!
Have I left anything out? Probably, yes. Please feel free to send me a private reply
if you require additional assistance,
or you can give me advice on how to better solve this problem. Thanks.
-
Visit the jfw ml web page: http://yoyo.cc.monash.edu.au/~nallan/jfw