ConsultingJoe Posted May 23, 2007 Posted May 23, 2007 I'm trying to get data from only the second instance of SysListView321. I'm using Utorrent and when 2 instances appear it always returns the first instance. if I dont click the tab that produces the second instance it works just fine. but after I do and even click a tab without it it still returns data from it.Any ideas whats wrong? Check out ConsultingJoe.com
Zedna Posted May 23, 2007 Posted May 23, 2007 Maybe [CLASSNN:SysListView32; INSTANCE:2] instead of [CLASSNN:SysListView321; INSTANCE:2] Post your code snippet for more help. Resources UDF ResourcesEx UDF AutoIt Forum Search
ConsultingJoe Posted May 23, 2007 Author Posted May 23, 2007 Maybe [CLASSNN:SysListView32; INSTANCE:2] instead of [CLASSNN:SysListView321; INSTANCE:2] Post your code snippet for more help.it has to be SysListView321 because thats the control. #include <A3LListView.au3> Opt( "WinTitleMatchMode", 2 ) $title = "µTorrent" $listcontrol = "[CLASSNN:SysListView321; INSTANCE:2]" $hWnd = ControlGetHandle( $title, "", $listcontrol ) $header_hWnd = _ListView_GetHeader($hWnd) $ccount = _ListView_GetColumnCount($hWnd) $icount = _ListView_GetItemCount($hWnd) Dim $listarray[$ccount][$icount+1] For $c = 0 To $ccount-1 $listarray[$c][0] = _Header_GetItemText($header_hWnd, $c) For $i = 0 To $icount-1 $itemtext = _ListView_GetItemText($hWnd, $i, $c) $listarray[$c][$i+1] = $itemtext Next Next For $c = 0 To $ccount-1 ConsoleWrite($listarray[$c][0]&@TAB&@TAB) For $i = 0 To $icount-1 ConsoleWrite($listarray[$c][$i+1]&@TAB) Next ConsoleWrite(@CRLF) Next ;$startpause = ControlClick( $title, "", "ToolbarWindow32", "left", 1, 187, 15 ) ;$remove = ControlClick( $title, "", "ToolbarWindow32", "left", 1, 116, 15 ) Check out ConsultingJoe.com
GaryFrost Posted May 23, 2007 Posted May 23, 2007 it has to be SysListView321 because thats the control. #include <A3LListView.au3> Opt( "WinTitleMatchMode", 2 ) $title = "µTorrent" $listcontrol = "[CLASSNN:SysListView321; INSTANCE:2]" $hWnd = ControlGetHandle( $title, "", $listcontrol ) $header_hWnd = _ListView_GetHeader($hWnd) $ccount = _ListView_GetColumnCount($hWnd) $icount = _ListView_GetItemCount($hWnd) Dim $listarray[$ccount][$icount+1] For $c = 0 To $ccount-1 $listarray[$c][0] = _Header_GetItemText($header_hWnd, $c) For $i = 0 To $icount-1 $itemtext = _ListView_GetItemText($hWnd, $i, $c) $listarray[$c][$i+1] = $itemtext Next Next For $c = 0 To $ccount-1 ConsoleWrite($listarray[$c][0]&@TAB&@TAB) For $i = 0 To $icount-1 ConsoleWrite($listarray[$c][$i+1]&@TAB) Next ConsoleWrite(@CRLF) Next ;$startpause = ControlClick( $title, "", "ToolbarWindow32", "left", 1, 187, 15 ) ;$remove = ControlClick( $title, "", "ToolbarWindow32", "left", 1, 116, 15 ) SysListView32 is the control SysListView321 is the 1st instance of it SysListView322 would be the 2nd instance of it and so on...... SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
ConsultingJoe Posted May 23, 2007 Author Posted May 23, 2007 SysListView32 is the controlSysListView321 is the 1st instance of itSysListView322 would be the 2nd instance of it and so on......but I'm trying to get data from instance 1when the second listview shows up that is 2 and autoit assumes 2324 worked but only after it created 2 other listviews. 321 works right when I start the program. so the instances change as more open even if it is instance 1. is there a way to count the instances then?Thanks, you've already helped a bunch Check out ConsultingJoe.com
Zedna Posted May 23, 2007 Posted May 23, 2007 (edited) Look hereYou can use CLASS and INSTANCE only for windows titles and for control id'sEDIT: sorrylook here$listcontrol = "[CLASS:SysListView32; INSTANCE:2]" $hWnd = ControlGetHandle( $title, "", $listcontrol ) Edited May 23, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
ConsultingJoe Posted May 24, 2007 Author Posted May 24, 2007 Thanks, I got the correct handle for only that control. I had to use a program for IR remote to create macos. it has a little program that gives you way more info than Autoit Window Info (beta) The handle was: 1901292 So I did this and no matter what I only got that data. $hWnd = 1901292;ControlGetHandle( $title, "", $listcontrol ) And here is my data:Name Smokin'.Aces[2007]DvDrip[Eng]-aXXo # Size 700 MB Done 100.0 % Status Finished Seeds 0 (0) Peers 0 (0) Down Speed 0.0 kB/s Up Speed 0.0 kB/s ETA 8 Uploaded 160 MB Ratio 0.229 Avail. 1.000 Label Added On 5/23/2007 12:45:54 AM Completed On 5/23/2007 2:21:13 AM Check out ConsultingJoe.com
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