Jump to content

Selecting an item from a list in a window.


Recommended Posts

I have a built an autoit script to set up a data connection in a program.

one of the windows that comes up is populated with a list which could be different on another PC. Basicly its a list of OLE DB providers, so depending on what ODBC drivers are installed on the pc would determine what is in the list. I need to select "Microsoft OLE DB Probider for SQL Server"

I have it working in my test environment by using a down arrow press 2 times which lands on the "Microsoft OLE DB Probider for SQL Server". Problem is on another PC pressing the down arrow 2 times lands me on a different OLE DB Connection.

here is a screen shot of the window im attempting navigate.

Posted Image

and here it is from another PC

Posted Image

Ive checked out the window info and did not see any reference to the choice I point to with the mouse.

Any ideas or help is greatly appreciated.

Link to comment
Share on other sites

after the initial selection of the sql data source I looked at the window info. In the visible window text session I noticed that the 2nd line is unique to each driver type. So If there was a way harvest that info and test against it that may just work.

Posted Image

again thanks for any input

Link to comment
Share on other sites

after the initial selection of the sql data source I looked at the window info. In the visible window text session I noticed that the 2nd line is unique to each driver type. So If there was a way harvest that info and test against it that may just work.

Posted Image

again thanks for any input

Run the AutoIt Window Info tool (comes with AutoIt) and get some information on the list control. It is probably trivial to get the list, pick exactly the one you want and select with the various methods in AutoIt to handle Combo boxes and ListView controls. Read the help file and run some of the demo scripts included for functions like ControlCommand(), _GuiCtrlCombo*, and _GuiCtrlListView*, etc.

:)

Edit: Whoa... those screen shots were not visible from the filtered connection I was on earlier... that is possibly a ListView, but even more likely a SysListView.

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

I have a built an autoit script to set up a data connection in a program.

...

Any ideas or help is greatly appreciated.

Couldn't you just set up your data connection using a connection string? See: http://www.connectionstrings.com/

That way, you will connect no matter what the order is in the "Data Link Properties" window (that is as long as the data provider is installed on the computer running the script, which is easy enough to test for).

Link to comment
Share on other sites

Couldn't you just set up your data connection using a connection string? See: http://www.connectionstrings.com/

That way, you will connect no matter what the order is in the "Data Link Properties" window (that is as long as the data provider is installed on the computer running the script, which is easy enough to test for).

I attempted to setup an ODBC manualy in windows. then Launched the Proprietary Data Selection tool.... and guess what there is no reference to it. The data connection needs to be setup with thier little tool (lame). Ill have to play around with PsaltyDS's ideas.

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...