AutoHotkey Community

It is currently May 26th, 2012, 10:02 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: October 16th, 2009, 4:55 am 
Hi All,

I am trying to select a row in a SysListView321 Listbox based on a string. Problem here is that the listbox has 5 columns and the string that I want to search for is in the fourth column. What is the most efficient way to search for the string and select the row that the string is located on?

Thanks in advance.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2009, 5:19 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Here's an option:
Code:
n:=""
SearchString := "" ; enter string
ControlGet, text, List, Col1, SysListView321, A
Loop, Parse, text, `n, `r
   If(A_LoopField=SearchString) {
      n:=A_Index-1
      ControlSend, SysListView321, {Home}{down %n%}, A
      Return
   }

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], dra, Exabot [Bot], Google [Bot], Google Feedfetcher, hyper_, JSLover, Leef_me, patgenn123 and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group