Jump to content
Sign in to follow this  
Zohar

[Solved] Can I perform operations on IE's Forms AutoComplete ListView?

Recommended Posts

Zohar

Hello

Can I perform operations on IE's AutoComplete ListBox?

for example _GUICtrlListBox_SelectString.

Right now what I'm doing is Sending "{Down}" several times, to select the right Item in the AutoComplete ListBox.

But the items there may change in the future,

so I'm looking for a more deterministic way of selecting a specific item, via its string..

Is it possible?

How do I get a Handle to the AutoComplete ListBox?

Edited by Zohar

Share this post


Link to post
Share on other sites
Pain

Are you sure it's a listbox and not a dropdown?

If it's a listbox you can use _GUICtrlListBox_SelectString as you said. The only difference from when you use it on your own GUI is that you need to get the handle (WinGetHandle) and use it as the $hWnd parameter.

Share this post


Link to post
Share on other sites
Zohar

It looks like a TextBox+ListBox no?

doesn't really look like a ComboBox..

you can see it in any site where you are required to enter Username+Password, and AutoComplete rememebers the usernames that used this site already.

my problem is to get the Handle to it..

anyone has done this before and can paste the code he used?

Share this post


Link to post
Share on other sites
Pain

I was thinking it might be a combobox because _GUICtrlComboBox_AutoComplete creates a AutoComplete box.

Share this post


Link to post
Share on other sites
Zohar

Well,

using AutoIt Window Info tool, I discovered that apparently the AutoComplete control is actually a ListView.

It seems like a ListView that has its own small window(this small window's size, and the listview' size are the same).

I attached here a screen shot of AutoIt Window Info tool, when pointing an open AutoComplete box.

The CLASSNN for the control is SysListView321.

But the weird thing is that the CLASS of the window containing it, is a name that contains spaces.. "Auto-Suggest Dropdown"...

How can a class name contain spaces hehe..

[see the attached image]

anyhow, I tried getting a Handle to this ListView control, and then Finding an item there,

and the result I get is 0 instead of 3.

anyone knows what I am doing wrong and how to fix it?

CODE

Local $hAutoComplete =ControlGetHandle("[CLASS:Auto-Suggest Dropdown]","","[CLASSNN:SysListView321]")

MsgBox(0,"",_GUICtrlListView_FindText($hAutoComplete,"user3"))

post-45260-1232956033_thumb.jpg

Edited by Zohar

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.