Jump to content

Drop down menu (ComboLBox) displays part of list, when move to last displayed item, it scrolls to show the rest. Stop scroll?


rjamesd
 Share

Recommended Posts

Hi,

I'm trying to automate selecting each item in a ComboLBox drop down menu.

What I have tried so far:

I have tried to do this by manipulating it with AutoIt Windows Control functions. Particularly, in my search for existing answers here and elsewhere, I found a reply to post: http://www.autoitscript.com/forum/index.php?showtopic=49775&st=0&p=601312&#entry601312

Which looked promising but it did not work for me: the items I can visibly see in the list are not made available to this code. The code can detect the number of items in the list, but each element appears to be garbage or some pointer or handle which I don't know how to use.

Being unsuccessful, I then considered using AutoIt to provide automated mouse moves and clicks to select each item. Unfortunately this has been unsuccessful too: The drop down menu displays part of list, I move the mouse pointer down the list, Windows highlights each item in turn as expected. But when I move the mouse pointer over last displayed item, Windows auto scrolls the menu to show rest of list.

How can the auto scroll be disabled?

I want the mouse pointer to remain on the last displayed item and Windows to not scroll the menu to show the rest of the items. This would make it easier to automate as I would be able to better control selecting each item - I need the item to remain static as I hover the mouse pointer over it.

If I want to see the other items then I would like Windows to do the auto scroll as I move off the last item to the bottom edge of the menu. But not straight away as soon as the mouse pointer moves on the item.

I tried to see if there was some kind of global Windows setting to turn off auto-scrolling/animations. There are some but not for this particular instance it seems. I asked this question at the website for the O'Reilly Windows Annoyances book series: http://annoyances.org/exec/forum/winxp/1259054052

I will keep trying - I may be able to come up with some hacky convoluted way to auto-select each item in this list. As I am not aware of any means to get a text string of each item in the drop-down list, I am also experimenting with OCR, Optical Character Recognition Software to parse the menu items. The free open source, google maintained Tesseract looks most encouraging: I have been able to run a short command line demo of getting ascii text from a .tif file - ideal for AutoIt to screen capture each small rectangular section of the menu list items as an uncompressed .tif and feel this to Tesseract and then get back a string.

But I thought I would ask here if anyone has a possible solution or for something similar. Perhaps an easier solution to mine.

Ideas?

A lot of data has been created using the software I am trying to automate and the wish is to extract it to use it in another application. The data is stored in closed, proprietary binary files with no documentation about their structure. Rather than attempt to reverse engineer the data files, so I thought another route (i.e. that discussed above) would be to try to load the files in to the program one by one and scrape the data off the program's graphical user interface.

Edited by rjamesd
Link to comment
Share on other sites

Can't test without a specific app that will generate this control type, but you might try looking over a solution posted by hvymetal: ComboLBox_SelectString()

:)

Edit: Oops, completely missed that you had tried that link already. My bad.

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Can't test without a specific app that will generate this control type, but you might try looking over a solution posted by hvymetal: ComboLBox_SelectString()

:)

Thanks but I have already tried that, as mentioned in the original post above:

Particularly, in my search for existing answers here and elsewhere, I found a reply to post: http://www.autoitscript.com/forum/index.php?showtopic=49775&st=0&p=601312&#entry601312

Which looked promising but it did not work for me: the items I can visibly see in the list are not made available to this code. The code can detect the number of items in the list, but each element appears to be garbage or some pointer or handle which I don't know how to use.

Given that I have been unsuccessful with the above, I will look further into driving the pointer as mentioned.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...