Sign in to follow this  
Followers 0
ConsultingJoe

[CLASSNN:SysListView321; INSTANCE:2] Does not seem to work

7 posts in this topic

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?

Posted Image


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



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 )

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

SysListView32 is the control

SysListView321 is the 1st instance of it

SysListView322 would be the 2nd instance of it and so on......

but I'm trying to get data from instance 1

when the second listview shows up that is 2 and autoit assumes 2

324 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


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

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

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

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