[jawsscripts] Re: switch to configuration

  • From: "Nicol Oosthuizen" <NOosthuizen@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 2 Dec 2008 07:48:08 +0200

Thanks lots and lots and lots.
This works like a charm!

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Paul Magill
Sent: 01 December 2008 02:53 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: switch to configuration

Hi Nicol,

I tried out your script with a much reduced Menu, , & a seperate script just 
to do the change without any DLGSelectItemInList statement.
The plain switchToConfiguration script worked fine as you said, but, the 
script with the DLGSelectItemInList statement appeared to fail.

I found that your script does actually change the configurations, but they 
immediately change back to their original when Internet Explorer regains 
focus.

I dont know why this should happen, it even happens if a long delay of 5 
seconds is placed between the closing of the DLGSelectItemInList statement, 
and the switchToConfiguration statement.

   Below is a fix, which worked fine in my tiny mock up of what you have.

The script sets a global variable, to the base name of the selected 
configuration file, & uses ScheduleFunction to call a function which 
actually does the change.  The called function uses the global to load the 
new configuration.

The sample menu I used, includes a file numbered 11, and one called Another, 
just to explore the possibilities.  It may be an advantage to name the 
files, rather than number them.

Globals
string GBaseConfigName


Void Function DoTheSwitch ()

SwitchToConfiguration (GBaseConfigName)

SayString (GetActiveConfiguration ()) ; for testing, or you may wish to keep 
it in

EndFunction





Script SelectToDictionary ()

VAR

STRING Menu,

INT Dictionary

Let menu = "1|2|3|11|another"

Let dictionary = DlgSelectItemInList (menu, "please select a dictionary to 
switch to", 0, 1)

IF (Dictionary == 0) THEN

RETURN; user hit escape

ENDIF

LET GBaseConfigName = StringSegment (Menu, "|", Dictionary)

Pause () ; so the dialog can close

ScheduleFunction ("DoTheSwitch", 5)

EndScript




----- Original Message ----- 
From: "Nicol Oosthuizen" <NOosthuizen@xxxxxxxxxxx>


Let me explain to you more fully what script files I'm talking about.
, I can't keep up with lots and lots of typoes made in service requests.
The survey job that I'm doing is based on information loaded from Siebel.
I'm using internet explorer to perform the surveys.
The information is loaded from Siebel into a pool and we use IE to use this 
pool. So now I add typoes and dates to the jaws .jdf file for internet 
explorer. It confuses me to hear dates in figures all the time and to hear 
typoes. Its stresses me out, so now I add these dates and typoes to the 
internet explorer.jdf file but it can only process 1000 entries.
In other words if there is 1000 entries in the internet explorer.jdf file 
and I add entry number 1001.
Lets say entry number 1001 is
Actual word: assssessssnmennnnt.
Replacement word:
Assessment.
Now I click ok and I save and exit the dictionary manager.
Now I'm back in internet explorer, where the service request is.
Now if I read the long description of the service request, jaws is going to 
read assessment as its spelled wrongly, not the way I set jaws to pronounce 
it, because jaws can only process 1000 entries.
So now I have copied all the files starting with internet explorer.
Step1: I go to the folder where all the script files are.
I click start, click programs, click jaws8, click explore jaws, and click 
explore my settings.
2.  now I copy all the files that starts with internet explorer, that means 
.jss, .jdf, .jsd, .jsb and .jkm.
I simply press I until I arrive at the first internet explorer file  and 
then  I  select all of them  with shift+down arrow  and I press control+c 
and control+v right after each other. Now I have files called: copy of 
internet explorer.jdf. etc.
Now I rename these files starting with the word copy, to a number such as 1, 
2 etc. Each time the current dictionary file gets full, I copy these files, 
and rename them to the next number.
3. then I delete the file called internet explorer.jdf.
So now I have the factory internet explorer.jdf file if I press insert+d, 
it's the default .jdf file for internet explorer that ships with jaws. It 
contains 15 entries.  I delete these 15 factory entries. so now I start 
adding entries such as dates and typoes to it.
If I come across a common typoe  such as assessment spelled wrong, I go to 
the previous .jdf file and there it is spelled right.
So now I don't have to add that incorrect spelling of assessment to the new 
.jdf file as its already in a previous .jdf file.
So I have created scripts to switch to each base configuration.
For example.
I assign the script's keystroke to windows key plus number 1, etc.
Then in the body of the script I put the function switch to configuration 
and in the parameter box I type in the number.
If within IE I press the keystroke that I have assigned such as windows key 
plus 1  that specific base configuration's .jdf file  is loaded.
But now I rather want a list of those base configurations so that I can 
choose base configurations because if I have more than 10 of these scripts I 
have to think of other keystrokes to use.
If I have all of them in a list and I can just pick one, I don't have to 
use a lot of keystrokes to press, I can just hit one keystroke  and  select 
the desired base configuration from a list.


__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Please Note: This email and its contents are subject to our email legal notice 
which can be viewed at http://www.sars.gov.za/Email_Disclaimer.pdf 
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: