I reproduced the problem with the JAWS function -- it appears to be a
bug. Here is alternative code that works:
Let oShell = CreateObject("WScript.Shell")
Let result = oShell.RegRead("HKEY_LOCAL_MACHINE\\" + SubkeyPath + "\\" +
SubKeyName)
Jamal
On Thu, 18 Oct 2007, Bryan
Garaventa wrote:
> Date: Thu, 18 Oct 2007 12:22:24 -0700
> From: Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx>
> Reply-To: jawsscripts@xxxxxxxxxxxxx
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] JAWS bug? SetRegistryEntryString and
> GetRegistryEntryString can't work together?
>
> I'm not sure if this is a JAWS bug or not, can anyone see what I'm doing
> wrong if so? This should work...
>
> const
> SubKeyPath "SOFTWARE\\MyKeyName",
> SubKeyName "VariableName"
>
> Script SetRegKeyVal ()
> ; This successfully writes VariableName=Testing under
> LocalMachine\SOFTWARE\MyKeyName
> SetRegistryEntryString (2, SubKeyPath, SubKeyName, "Testing")
> EndScript
>
> Script GetRegKeyVal ()
> var string Result
> ; However, this returns a blank string every time.
> let Result = GetRegistryEntryString (2, SubKeyPath, SubKeyName)
> CopyToClipboard (Result)
> Say (Result, 0)
> EndScript
__________
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts