walle Posted October 10, 2007 Share Posted October 10, 2007 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) Link to comment Share on other sites More sharing options...
Zedna Posted October 10, 2007 Share Posted October 10, 2007 (edited) You need: Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Edited October 10, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
walle Posted October 10, 2007 Author Share Posted October 10, 2007 You need: Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Link to comment Share on other sites More sharing options...
Zedna Posted October 10, 2007 Share Posted October 10, 2007 $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 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
walle Posted October 11, 2007 Author Share Posted October 11, 2007 (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 October 11, 2007 by walle Link to comment Share on other sites More sharing options...
Zedna Posted October 11, 2007 Share Posted October 11, 2007 (edited) 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 October 11, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted October 11, 2007 Share Posted October 11, 2007 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) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
walle Posted October 11, 2007 Author Share Posted October 11, 2007 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±ÐÅÕ½Ðì°ÀÌØí-½Éؤ)µÍ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí-½ÉØ Link to comment Share on other sites More sharing options...
Zedna Posted October 11, 2007 Share Posted October 11, 2007 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ç- Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now