Sign in to follow this  
Followers 0
walle

Listview finditem

9 posts in this topic

Well, I'm trying to get the script to search for a specific torrent called "autoit"

and then return the value. I'm not sure how the "finditem" works, but it seems it can't

find the torrent. Basically I'll use finditem to get the string value, insert it into

listviews "select" and then get the name of the torrent.

Last, does the "finditem" support x64 yet?

WinActivate("µTorrent 1.7.5")
$hWnd = WinGetHandle("µTorrent 1.7.5")
$Selectall = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Selectall")
$Finditem = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Finditem", "autoit")
$Select = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Select",$Finditem)
msgbox(0,"",$Select)

Share this post


Link to post
Share on other sites

You need:

Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

Share this post


Link to post
Share on other sites

$Finditem = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Finditem", "autoit")

ControlListView probably search only for "begins". Try to use Auto3Library or new Gary's UDF for ListView in latest beta:

_GUICtrlListView_FindInText

_GUICtrlListView_FindItem

_GUICtrlListView_FindText

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

$Finditem = ControlListView($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]", "Finditem", "autoit")

ControlListView probably search only for "begins". Try to use Auto3Library or new Gary's UDF for ListView in latest beta:

_GUICtrlListView_FindInText

_GUICtrlListView_FindItem

_GUICtrlListView_FindText

Okey, installed a3library.

Still the string returns -1 =/

#include <A3LListView.au3>
$hWnd = WinGetHandle("µTorrent 1.7.5")
$Korv = _ListView_FindInText($hWnd, "Heroes")
msgbox(0,"",$Korv )
Edited by walle

Share this post


Link to post
Share on other sites

Or try:

WinActivate("µTorrent 1.7.5")
$hWnd = WinGetHandle("µTorrent 1.7.5")
$Selectall = ControlListView($hWnd, "", "SysListView321", "Selectall")
$Finditem = ControlListView($hWnd, "", "SysListView321", "Finditem", "autoit")
$Select = ControlListView($hWnd, "", "SysListView321", "Select",$Finditem)
msgbox(0,"",$Select)

Share this post


Link to post
Share on other sites

Thanks Zedna!

Finally it returned the right string.

Short question. Can I get the mouse to

move over the string I been looking for?

Sure, I could do something like

Select
Case $Korv = 0 then
movemouse ($X, $Y, 10)
endselectoÝ÷ Ù«­¢+Ø¥¹±Õ±ÐíÍ11¥ÍÑY¥Ü¹ÔÌÐì(ÀÌØíIÉÍÌôÅÕ½Ðí!ɽÌÅÕ½Ðì(ÀÌØí¡]¹Äô
½¹Ñɽ±Ñ!¹± ÅÕ½ÐîÕQ½ÉɹÐĸܸÔÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíMåÍ1¥ÍÑY¥ÜÌÈÄÅÕ½Ðì¤(ÀÌØí¡]¹ô]¥¹Ñ!¹± ÅÕ½ÐîÕQ½ÉɹÐĸܸÔÅÕ½Ðì¤(ÀÌØí-½ÉØô}1¥ÍÑY¥Ý}¥¹%¹QáÐ ÀÌØí¡]¹Ä°ÀÌØíIÉÍ̤(ÀÌØíM±Ðô
½¹Ñɽ±1¥ÍÑY¥Ü ÀÌØí¡]¹°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíMåÍ1¥ÍÑY¥ÜÌÈÄÅÕ½Ðì°ÅÕ½ÐíM±ÐÅÕ½Ðì°ÀÌØí-½Éؤ)µÍ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí-½ÉØ

Share this post


Link to post
Share on other sites

Short question. Can I get the mouse to

move over the string I been looking for?

Sure, I could do something like

Select
Case $Korv = 0 then
movemouse ($X, $Y, 10)
endselectoÝ÷ Ù«­¢+Ø¥¹±Õ±ÐíÍ11¥ÍÑY¥Ü¹ÔÌÐì(ÀÌØíIÉÍÌôÅÕ½Ðí!ɽÌÅÕ½Ðì(ÀÌØí¡]¹Äô
½¹Ñɽ±Ñ!¹± ÅÕ½ÐîÕQ½ÉɹÐĸܸÔÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíMåÍ1¥ÍÑY¥ÜÌÈÄÅÕ½Ðì¤(ÀÌØí¡]¹ô]¥¹Ñ!¹± ÅÕ½ÐîÕQ½ÉɹÐĸܸÔÅÕ½Ðì¤(ÀÌØí-½ÉØô}1¥ÍÑY¥Ý}¥¹%¹QáÐ ÀÌØí¡]¹Ä°ÀÌØíIÉÍ̤(ÀÌØíM±Ðô
½¹Ñɽ±1¥ÍÑY¥Ü ÀÌØí¡]¹°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíMåÍ1¥ÍÑY¥ÜÌÈÄÅÕ½Ðì°ÅÕ½ÐíM±ÐÅÕ½Ðì°ÀÌØí-½Éؤ)µÍ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí-½ÉØoÝ÷ Ûú®¢×¢´¸¬µXÀg­"צEç-r^Ó~Eç-

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  
Followers 0