[jawsscripts] How to use SwitchToConfiguration function to get it to work?

  • From: Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx>
  • To: JAWSScripts List <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 10 Nov 2013 08:11:53 +0100

Hi guys,

I have to correct myself. In my previous mail I told you that the 
SwitchToConfiguration function does not work. It is not true. It works, 
but on an interesting way. The situation is:

I use notepad for testing purposes. It has its own config set, called of 
course notepad. I have copied its dictionary file and renamed to 
notepad2. I have written and compiled a script file, too, named notepad2.
I have written a script in the notepad.jss to switch to the notepad2 
configuration. This one:

script ChangeConfig
switchtoconfiguration ("notepad2")
saystring ("The currentyl active config is: " + GetActiveConfiguration ())
saystring ("test it")
endscript

In the notepad2.jdf dictionary file are only 2 entries. The first one 
changes the word "test" to "blablabla". The second one should replace 
the word "it" to "sad".

So, when I invoke the script, then I hear:
"The currently active config is notepad2.", and after it, "blablabla 
sad", in place of "test it". It is correct, because I have changed the 
announcement of them in the dictionary file of notepad2 configuration At 
least it is tho hear "edit box", which signs that notepad's text editor 
has the focus again and I can begin type. I assumed, that if I write the 
words "test" and "it", then JJAWS will translate them according the 
recently loaded notepad2 dictionary to "blablabla" and "sad", as they 
are recorded in this file. But not! It seems, that at the end of the 
script, which has canged the configuration to notpad2, this 
configuration unloads and the original one takes in effect.
It is interesting, because if I use SwitchToScript function, then JAWs 
loads the passed script and it remains in effect until I close the 
notepad or I load a new one.

How could I get the same functionality with configurations?  I would 
like that after change remain it in effect until I rechange it or close 
Notepad. But after restarting Notepad its original configuration should 
be loaded again.

Thanks,

Csab
__________ďż˝

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

Other related posts: