Re: JAWS Scripting Help?

  • From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 18 Oct 2007 08:15:06 +0100

Hi Bryan,

 You may have solved the problem, but there are a number of twists so I'll
bore you with my solution if I may.

 It is possible to either define string constants for the parameters, or
enter strings directly, so I will show code for the latter approach.

---code begins---
Script test ()
; this is the key I am trying to add a data string to
;HKEY_LOCAL_MACHINE\SOFTWARE\DTI

If (SetRegistryEntryString (2, "SOFTWARE\\DTI", "test", "HELLOO")) Then
 SayString ("eureka")
Else
 SayString ("bloody hell")
EndIf

EndScript
---code ends---

If I run this code with a single backslash in the second parameter string, the function returns success, but doesn't write anything into the registry. With double backslashes, the function returns failure, but it actually writes the required value into the correct place. The value "test" doesn't have to be present beforehand; that is also written correctly. Beware that if you keep regedit open in the background while running the script, you have to refresh its display with f5 before you can observe the change in the registry.

I have no idea why the FSDN says that string parameter variables can be used to return data by reference.

 hth

Martin


----- Original Message ----- From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, October 18, 2007 12:58 AM
Subject: Re: JAWS Scripting Help?


Thanks, I truly appreciate it. Freedom Scientific certainly doesn't help
much by making the directions and parameter info as vague as possible.
----- Original Message ----- From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, October 17, 2007 4:46 PM
Subject: Re: JAWS Scripting Help?


Hi Bryan,

 I'm using JAWS 8 under XP Home, and I can get the function
SetRegistryEntryString to return success, but it doesn't add any string
to the registry in the expected place.

 However by using the search utility in regedit and looking for the
string data, I found that it had been added to a key upstream of where I
was aiming.

 I haven't had time to work out how to put the value in the right place,
but I expect there is a workaround.  I'll have another look tomorrow as
it's now past my bedtime.

 hth

Martin


----- Original Message ----- From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, October 17, 2007 11:18 PM
Subject: JAWS Scripting Help?


Does anyone have some example code for how to use
SetRegistryEntryString?

I've tried everything I can think of to save a string to a key in the
registry using this function, yet it fails every time.

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



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


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



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

Other related posts: