[jawsscripts] Problems with Read and Write Ini functions

  • From: "David Pinto" <davepinto@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 19 Jan 2012 17:36:22 -0800

There have been discussions on this list about different circumstances where 
JAWS ini functions are unreliable. I recently scoped out one particular 
circumstance where these functions fail entirely, or actually write to the 
wrong file. The problem occurs when the following 2 conditions are met.
1. The ini functions are called 2 or more times consecutively but on 
different files. And 2. The different files have the exact same name, but 
they are in different folders. Here are the details along with some 
examples:

If you write to an existing INI file in an existing folder path, and then 
try writing to a same-named INI file in a different folder path, there will 
be a failure to write to that second same-named INI file. Instead, what 
happens is that the first written INI file is written to.  For instance:
1. Write to the file <Anatomy.ini> in the path <C:\Girls\Anatomy.ini>. THIS 
WORKS JUST FINE.
2. Next try writing to the same-named file <Anatomy.ini> that's in the path: 
<C:\Boys\Anatomy.ini>. THIS CONSISTENTLY FAILS. What happens is that instead 
of the Boys' INI file being written to, the Girls' INI file is written to.

The exact same failure occurs if the folders don't exist and you're using 
IniWriteString () to both create them and write to the INI file. For 
instance:
1. Create and write to <C:\Girls\Anatomy.ini.>. THIS CREATES AND WRITES JUST 
FINE.
2. Next try to create and write to <C:\Boys\Anatomy.ini.>. THIS CONSISTENTLY 
FAILS TO CREATE THE NEW FOLDER PATH.
Instead, what happens is that the Anatomy.ini in the Girls folder is written 
to.

Finally, if you're merely wanting to create folders, the same behaviour 
holds. If the last folder in the second path is the same name as the last 
folder in the first path, then you can't create the second group of folders. 
For instance
1. Create and write to <C:\Parents\Students>. THIS CREATES THE FOLDERS JUST 
FINE.
2. Next try to create  <C:\Teachers\Students>. THIS CONSISTENTLY FAILS TO 
CREATE THE NEW FOLDER PATH.

Note that this behaviour is not corrected by including the IniFlush () 
function, but it temporarily goes away by reloading JAWS.

On a different but related note. Sometimes when trying to manually delete 
one of those newly JAWS' created folders, Windows says "You need permission 
to perform this action" But if you shut down JAWS, deletion is successful. I 
haven't rigourously tested this out yet, so I can not duplicate the failure 
every time.

David Pinto


__________�

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

Other related posts: