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:
Jeff WeissSubject:
adding items to an xml listboxDate:
Fri, Mar 26, 2010 1:49:05 pmcharset="us-ascii"
I am trying to change my TextToClip script to use an xml dialog instead
of the (shared object listbox) so that I can have additional buttons.
I need some help to understand how to add items to the listbox in the
xml dialog.
I don't want the listitems in the xml file, but rather I want to read
item names from a textfile and use these items in the listbox.
Part of the routine is below, and of course, the line to add items to
the listbox doesn't work.
Function DialogEventHandler(dObj, dEvent, dId, dControl)
DialogEventHandler = False
' read item names from a textfile and split into array elements
strContents = SOFileToString(ScriptBase & "List.txt", "Ascii")
MyArray = Split(StrContents, VbCrLf, -1, 1)
I = 1
For Each Item in MyArray
' this part doesn't work
dObj.AddItem MyArray(I), MyArray(I)
I = I + 1
Next
If some one could shed a little light here, I would appreciate it.
Jeff Weiss
I am trying to change my TextToClip script to use an xml dialog instead
of the (shared object listbox) so that I can have additional buttons.
I need some help to understand how to add items to the listbox in the
xml dialog.
I don't want the listitems in the xml file, but rather I want to read
item names from a textfile and use these items in the listbox.
Part of the routine is below, and of course, the line to add items to
the listbox doesn't work.
Function DialogEventHandler(dObj, dEvent, dId, dControl)
DialogEventHandler = False
' read item names from a textfile and split into array elements
strContents = SOFileToString(ScriptBase & "List.txt", "Ascii")
MyArray = Split(StrContents, VbCrLf, -1, 1)
I = 1
For Each Item in MyArray
' this part doesn't work
dObj.AddItem MyArray(I), MyArray(I)
I = I + 1
Next
If some one could shed a little light here, I would appreciate it.
Jeff Weiss




