Reading a Listbox

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Norm_Rumac
Newbie
Posts: 2
Joined: Mon Jan 12, 2004 9:04 pm

Reading a Listbox

Post by Norm_Rumac » Mon Jan 12, 2004 9:11 pm

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

Lumumba

Post by Lumumba » Mon Jan 12, 2004 11:02 pm

If the listbox is part of a website you could scan the pages source for the keywords between the "option" tags:

Select a forum
Macro Scheduler
----------------
General Discussion
Technical / Scripting
Beginners
Important Announcements
Macro Scheduler Beta
Run Program>
Position>
MidStr>

Norm_Rumac
Newbie
Posts: 2
Joined: Mon Jan 12, 2004 9:04 pm

Post by Norm_Rumac » Mon Jan 12, 2004 11:18 pm

unfortunately, the listbox is part of a window for a win32 based gui app.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jan 13, 2004 7:12 am

:idea: How about this:

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!

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Tried that, doesn't work for me

Post by mightycpa » Fri Jan 16, 2004 8:23 pm

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
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts