Hi. I was wondering if it was possible to read in the entries of a listbox control in a Window.
Basically, I have an application which contains a listbox. I was to be able to read in each entry of the listbox, and copy the contents entry into another application.
I do not know how to even do this manually because if I type Ctrl-C (Copy) on an individual item, and then press Ctrl-V (paste) on another window, nothing happens (i.e. the contents are not pasted).
Any ideas here?
--Norm
Reading a Listbox
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 2
- Joined: Mon Jan 12, 2004 9:04 pm
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:

Go to the list box. Execute a loop that presses the down arrow to select the item on the list, CTL-C to copy it toclipboard. Send clipboard to a temp destination, and press down again (or increase the down arrow count by one, depends on list box methods). repeat until the current value = the last value, then you know you are done. Now transfer the contents of the temp location to final destination.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Tried that, doesn't work for me
Actually, I'm working with a java application, and the list box is a swing control from which you pick dates. Although there are a limited number of dates within the available choices, you cannot predict what the presented choices will be. There is no way so simply enter the date, it must be selected via thie app's control.
I tried the Copy and Paste. Basically, it doesn't copy the text of the choice, so I'm ready for another idea.
Tx,
George
I tried the Copy and Paste. Basically, it doesn't copy the text of the choice, so I'm ready for another idea.
Tx,
George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey