The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.

From:

 Cory Samaha

Subject:

 accessing the GW Toolkit from JScript

Date:

 Sun, Apr 18, 2010 5:29:29 am
Greetings all,

What is the accepted approach for accessing the GW Toolkit from a
Window-Eyes hosted JScript script? In the following lines of code, I'm
trying to launch the hotkey manager. I haven't gotten to add keys yet, I
just want to make sure I can launch it first. The following produces an
error. Note that myStrings is a variable previously defined and I have
confirmed that it works as it should.

var hotkeyManager SharedObjects("com.GWMicro.GWToolkit.HotkeyManager").newDialog();
hotkeyManager.INIFileName = iniFileName;
hotkeyManager.INISectionName = "Hotkeys";
hotkeyManager.KeyStrings() = myStrings;

I'm getting an error on the line that says hotkeyManager.KeyStrings() myStrings; which says

Cannot assign to a function result



In the GW toolkit documentation examples which use VBScript syntax, I've
seen places where keyStrings() is used both with and without parentheses
after it. I know that VBScript is less picky about the inclusion of
parentheses, but just in case, I tried that line omitting the parentheses as
in the following line.

hotkeyManager.KeyStrings = myStrings;
Now I get the following error.

Object doesn't support this property or method



So, obviously there is some syntax I'm not getting right. Has anyone ever
tried to do this? Any thoughts?

Thanks,
Cory