Jump to content
teddyh2o

SysListView search text and click

Recommended Posts

teddyh2o

Hello guys,

I am new to AutoIt and not a good programmer. I have gone through guides and tutorials to get my script going. 

However, i am stuck on a little function. 

I need to search a text and click on the searched text. The program that i am using autoit with, ControlListView won't work since it needs to click on the text. 

The texts are under SysListView32 class. 

I tried following codes

$_UserName = "USERNAME"
$hWnd = WinGetHandle("WINDOW INFO")
$Finditem = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Finditem", $_UserName)
$Select = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Select",$Finditem)
_GUICtrlListView_SetItemSelected($select, 0, True, True)

any idea or tip?

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@teddyh2o

Did you check the return values/possible errors of each function? :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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

×