Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Can't control SysListView32 in VirtualDub


  • Please log in to reply
5 replies to this topic

#1 bumsbomber

bumsbomber

    Seeker

  • Active Members
  • 5 posts

Posted 14 April 2012 - 10:52 AM

Hi

I hope there are people out there which have installed VirtualDub (Open Source) or are willing to install it to help me ;)

What I want to do:
I want to see what filters are set and being able to (de-)select, delete or manipulate them...

Problem:
I don't get all the informations I need out of the SysListView32 control and so I can't manipulate it with AutoIt. Some commands work (like "GetItemCount"), but most does not (like "GetText"). The control seems to be no default SysListView32 - Please look at the attachement if you don't have installed VirtualDub.

2012-04-14 12-48-22_Filters.png

Example:
Open up VirtualDub, press CTRL+F to open up the filters dialog, and add some filters of your choice and "null transform" as I use it's name in the example code. Then run the code below.

#Include <GuiListView.au3> $filters_title = "[TITLE:Filters]" $filters_cid   = "[CLASS:SysListView32; INSTANCE:1]" $filters_hwnd = ControlGetHandle($filters_title,"",$filters_cid) $clv_filters_count  = ControlListView($filters_title,"",$filters_cid,"GetItemCount") $clv_filters_select = ControlListView($filters_title,"",$filters_cid,"GetSelected") $clv_filters_text   = ControlListView($filters_title,"",$filters_cid,"GetText", 0, 0) ; does not work $clv_filters_0trans = ControlListView($filters_title,"",$filters_cid,"FindItem","null transform") ; does not work $gui_filters_count  = _GUICtrlListView_GetItemCount($filters_hwnd) $gui_filters_select = _GUICtrlListView_GetItemSelected ($filters_hwnd,1) $gui_filters_text   = _GUICtrlListView_GetItemTextString($filters_hwnd,-1) ; Only 3 separators as result $gui_filters_0trans = _GUICtrlListView_FindText($filters_hwnd,"null transform",-1,True) ; I get a 10-char number (?) ConsoleWrite("ControlListView  ::: " & "Filter Count: " & $clv_filters_count & " / Selected: " & $clv_filters_select & " / Item Text: " & $clv_filters_text & " / null transform: " & $clv_filters_0trans & @CRLF) ConsoleWrite("_GUICtrlListView ::: " & "Filter Count: " & $gui_filters_count & " / Selected: " & $gui_filters_select & " / Item Text: " & $gui_filters_text & " / null transform: " & $gui_filters_0trans & @CRLF)



Any chance I can work with the control? I really hope you can help me :)

Edited by bumsbomber, 14 April 2012 - 10:57 AM.








#2 PsaltyDS

PsaltyDS

    Most Venerable Penguin

  • MVPs
  • 13,279 posts

Posted 14 April 2012 - 05:43 PM

Examine the control with the AutoIt Window Info Tool (AU3Info.exe), and post the contents of the "Summary" tab. That will tell much more than the screen shot.

;)
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

#3 bumsbomber

bumsbomber

    Seeker

  • Active Members
  • 5 posts

Posted 15 April 2012 - 03:18 AM

Oh, of course, sorry!

Plain Text         
>>>> Window <<<< Title:  Filters Class:  #32770 Position:   361, 162 Size:   521, 357 Style:  0x94CC004C ExStyle:    0x00010100 Handle: 0x000404E0 >>>> Control <<<< Class:  SysListView32 Instance:   1 ClassnameNN:    SysListView321 Name:   Advanced (Class):   [CLASS:SysListView32; INSTANCE:1] ID: 1023 Text:   Position:   11, 11 Size:   405, 284 ControlClick Coords:    193, 31 Style:  0x5001880D ExStyle:    0x00000204 Handle: 0x00020500 >>>> Mouse <<<< Position:   569, 230 Cursor ID:  0 Color:  0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< OK Cancel &Add... &Delete Move &Up Move D&own C&ropping... &Configure... &Blend &Show image formats Show &pixel aspect ratios Show &frame rates O&ptions... >>>> Hidden Text <<<<


What tell's it to a pro? ^^

Edited by bumsbomber, 15 April 2012 - 03:20 AM.


#4 KaFu

KaFu

    Hey, it's just me, KhaFoo...

  • MVPs
  • 3,409 posts

Posted 15 April 2012 - 01:22 PM

This is what I get using your code:

ControlListView  ::: Filter Count: 2 / Selected: 1 / Item Text:  / null transform: -1 _GUICtrlListView ::: Filter Count: 2 / Selected: True / Item Text: |320x240|320x240|null transform / null transform: -1


Seems fine to me. Is your AutoIt set to compile as x86 or x64? AutoIt x86 is needed to access external x86 Listview details.

#5 bumsbomber

bumsbomber

    Seeker

  • Active Members
  • 5 posts

Posted 16 April 2012 - 05:33 AM

Damnit, you're right! It stands in the documentation and i've read it, but I didn't knew I've had installed or compiled with AutoIt x64.

Now it works fine ;) Big thanks.

Edited by bumsbomber, 16 April 2012 - 05:33 AM.


#6 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,795 posts

Posted 16 April 2012 - 10:55 AM

You can add this at top of your script:
#AutoIt3Wrapper_UseX64=n

then Scite4Autoit3 will do the rest for you automatically.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users