Pandaren Posted June 6, 2010 Share Posted June 6, 2010 hey guys, i tried to get the row information of an item in utorrent. MsgBox(0, "", ControlListView("µTorrent 2.0.2", "", "SysListView322", "GetText", 0, 4)); However it doesn't work. When i try this: MsgBox(0, "", ControlListView("µTorrent 2.0.2", "", "SysListView322", "GetItemCount")); everything went absolutely fine and also adding items will give me the exact value of items. But only "GetText" doens't work and im getting no return in my MsgBox. I also tried the same code on other programs and it works fine... Does anyone know whats the problem? Link to comment Share on other sites More sharing options...
DW1 Posted June 6, 2010 Share Posted June 6, 2010 (edited) This picked them all up for me... I used the Control ID though, since it remained static. The instance of the listviews keep changing, so it is unreliable to use "SysListView322". #include <array.au3> $Array = Utorrent("Status") If IsArray($Array) Then _ArrayDisplay($Array) $Array = Utorrent("Torrents") If IsArray($Array) Then _ArrayDisplay($Array) Func Utorrent($Data) If $Data <> "Status" And $Data <> "Torrents" Then Return 0 If $Data = "Status" Then $Data = 1259 If $Data = "Torrents" Then $Data = 27 $num = ControlListView("µTorrent 2.0.2", "", $Data, "GetItemCount") $sub = ControlListView("µTorrent 2.0.2", "", $Data, "GetSubItemCount") Local $aTorrents[$num][$sub] For $a = 0 To $num - 1 For $b = 0 To $sub - 1 $aTorrents[$a][$b] = ControlListView("µTorrent 2.0.2", "", $Data, "GetText", $a, $b) Next Next Return $aTorrents EndFunc ;==>UtorrentList Edited June 6, 2010 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Pandaren Posted June 7, 2010 Author Share Posted June 7, 2010 hey danwilli, i tested your script, but unfortunately it doesn t work, the list is completly empty... But thanks for spending time in this maybe there is a little error and it will work. Pandaren Link to comment Share on other sites More sharing options...
DW1 Posted June 7, 2010 Share Posted June 7, 2010 You need to replace the "27" and "1259" in the script with the control ID's that you see in the AutoIt Info Tool. Since these are apparently NOT static, to make this work universally, we would need to get the controlID by position of controls... search around for something similar, I would, but I have to go to school. Good luck. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Pandaren Posted June 8, 2010 Author Share Posted June 8, 2010 i dont really get it... I have started AutoIt and checkt the ID and they are exactly the same, so what am i doing wrong? Link to comment Share on other sites More sharing options...
JohnOne Posted June 13, 2010 Share Posted June 13, 2010 Utorrent has a web API that might better help you http://forum.utorrent.com/viewforum.php?id=20 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
picaxe Posted June 14, 2010 Share Posted June 14, 2010 #include <GuiListView.au3> $sDelim = "|" $hListview = ControlGetHandle("µTorrent 2.0.2", "", "[CLASS:SysListView32; INSTANCE:2]") $sItems = "" For $i = 0 To _GUICtrlListView_GetItemCount($hListview) - 1 For $j = 0 To _GUICtrlListView_GetColumnCount($hListview) - 1 $sItems &= _GUICtrlListView_GetItemText($hListview, $i, $j) & $sDelim Next $sItems = StringTrimRight($sItems, 1) & @CRLF Next ConsoleWrite($sItems) 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