Hi Kevin
In manipulating character dictionaries in my app I did not use the
rename method, but a number of other file manipulation methods. I tested
whether a dictionary existed, copied, moved and deleted dictionaries.
Here are some code snippets which might be helpful. First I defined the
File System Object which I needed for the file manipulation:
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
Below are two subroutines in which I did some of the file manipulation:
Sub ActivateAfrikaans
bAfrikaans = true
If fso.FileExists(ClientInformation.ScriptPath & "\Char.chr") Then
fso.CopyFile ClientInformation.ScriptPath & "\char.chr",
ClientInformation.ScriptPath & "\char.chr.old"
fso.CopyFile ClientInformation.ScriptPath & "\Afrikaans.chr",
ClientInformation.ScriptPath & "\char.chr"
RefreshSets
End Sub
Sub DeactivateAfrikaans
If bAfrikaans = true Then
bAfrikaans = false
fso.CopyFile ClientInformation.ScriptPath & "\char.chr",
ClientInformation.ScriptPath & "\Afrikaans.chr", true
fso.DeleteFile ClientInformation.ScriptPath & "\char.chr"
If fso.FileExists(ClientInformation.ScriptPath & "\char.chr.old") Then
fso.MoveFile ClientInformation.ScriptPath & "\char.chr.old",
ClientInformation.ScriptPath & "\Char.chr"
End If
RefreshSets
End If
End Sub
I hope you'll find something useful in this.
Kind regards
Christo
On 2011/08/08 3:54 PM, Kevin Huber wrote:
Hi Chip:
I don't think I kept that message. Anyway, what is the syntax for
renaming a dictionary file?
Kevin Huber
On 8/6/11, Chip Orange<[email protected]> wrote:
Hi Kevin,
No, there are bugs with the methods which close or open any of the
dictionary types (am not sure, but think they came in 7.5), so afraid the
obvious way of doing things won't work for now. Someone from GW (maybe
Mike?) did suggest to someone else here (Christo De Clerk I think, who was
doing the same type of thing with another dictionary type, that he could
just rename the standard dictionary file to something else, and rename his
to the standard name when he wanted WE to use his, and then reverse the
process when time to undo it. I believe it worked fine for him.
hth,
Chip
-----Original Message-----
From: Kevin Huber [mailto:[email protected]]
Sent: Friday, August 05, 2011 2:21 PM
To: gw-scripting
Subject: problem with my Proofreading script
I have a hotkey in my Proofreading script that turns on a Homonyms Mode
which will automatically spell words that sound alike.
The way it should work, is that it loads an exception dictionary called
Homonyms.dic and when you turn it off, it reloads the default exception
dictionary.
It worked well in previous versions of Window-eyes but it does not work now
and I strongly suspect that it hasn't worked since WE 7.5 The command:
activesettings.exceptiondictionary.open(homonyms.dic") is not working.
Has the syntax of the command to open an exception dictionary changed?
Kevin Huber