Loading ...
Sorry, an error occurred while loading the content.

List the nodes in a SysTreeView32 control

Expand Messages
  • gilbertho21
    Hi, I have a question on how I can iterate thru all the nodes in a tree control on a simple GUI app. The tree control is on the left pane of the GUI app.
    Message 1 of 3 , Oct 14, 2004
    • 0 Attachment
      Hi,

      I have a question on how I can iterate thru all the nodes in a tree
      control on a simple GUI app. The tree control is on the left pane of
      the GUI app. Winspy showed the window where the tree control resides
      is directly below the main window with
      class "WindowsForms10.SysTreeView32.app3". Using the Win32::ActAcc
      package, I tried converting the window into an AO and iterate it.
      But nothing meangingful showed up:

      my @hView = FindWindowLike( $hMainWin, undef, "TreeView");
      @hView or die "Cannot find the TreeView control\n";
      my $hTreeview = $hView[0];
      printf( "Window handle of TreeView is %x\n", $hTreeview );

      my $aoTreeView = AccessibleObjectFromWindow($hTreeview);
      my $iter = $aoTreeView->iterator();
      $iter->open();
      my $aoi;
      while ($aoi = $iter->nextAO())
      { print $aoi->describe() . "\n"; }
      $iter->close();

      C:\home>perl t.pl
      Window handle of TreeView is d0580
      Error 800401f0 in textAccessor at
      C:/Perl/site/lib/Win32/ActAcc/AO.pm line 30.
      menu bar:System {invisible,(0,0,0,0),id=0,000d0580}:
      title bar:(undef) {invisible,(0,0,0,0),id=0,000d0580}:
      menu bar:Application {invisible,(0,0,0,0),id=0,000d0580}:
      Error 800401f0 in textAccessor at
      C:/Perl/site/lib/Win32/ActAcc/AO.pm line 30.
      ?:(undef) {?,(location error),id=-4,(no HWND)}:
      scroll bar:Vertical {invisible,(0,0,0,0),id=0,000d0580}:
      scroll bar:Horizontal {invisible,(0,0,0,0),id=0,000d0580}:
      grip:(undef) {unavailable+invisible,(0,0,0,0),id=0,000d0580}:
      C:\home>

      Help?!
      Gilbert
    • Gabor Szabo
      ... AFAIK TreeView32 is and MFC thingy and as far as I can tell Win32::GuiTest cannot yet handle that. I have not seen this Win32::ActAcc earlier I ll check it
      Message 2 of 3 , Oct 15, 2004
      • 0 Attachment
        On Fri, 15 Oct 2004, gilbertho21 wrote:

        > I have a question on how I can iterate thru all the nodes in a tree
        > control on a simple GUI app. The tree control is on the left pane of
        > the GUI app. Winspy showed the window where the tree control resides
        > is directly below the main window with
        > class "WindowsForms10.SysTreeView32.app3". Using the Win32::ActAcc
        > package, I tried converting the window into an AO and iterate it.
        > But nothing meangingful showed up:


        AFAIK TreeView32 is and MFC thingy and as far as I can tell Win32::GuiTest
        cannot yet handle that.

        I have not seen this Win32::ActAcc earlier I'll check it out too once I
        have a bit more time again with windows testing stuff.

        In the meantime I am sure lot's of people here will appreciate if you can
        come up with some solution, even a partial solution.

        Gabor
      • mohamed rafeek
        Hai guys, This is Rafeek.it is my first mail to this group. i have developed one tool for iterating nodes in treeview control. here i show some sample scripts.
        Message 3 of 3 , Nov 3, 2004
        • 0 Attachment
          Hai guys,
          This is Rafeek.it is my first mail to this group. i have developed one tool for iterating nodes in treeview control.
          here i show some sample scripts. Any doubts regarding tool plz mail me.


          Rafeek.,

          my @list=`$root\\treeview.exe -w "Device Manager"`;
          foreach(@list)
          {
          print "$_\n";
          }

          (or)

          my @list=`$root\\treeview.exe -w "Device Manager" -r Batteries`;
          foreach( @list)
          {
          print "$_\n";
          }
          Gabor Szabo <gabor@...> wrote:
          On Fri, 15 Oct 2004, gilbertho21 wrote:

          > I have a question on how I can iterate thru all the nodes in a tree
          > control on a simple GUI app. The tree control is on the left pane of
          > the GUI app. Winspy showed the window where the tree control resides
          > is directly below the main window with
          > class "WindowsForms10.SysTreeView32.app3". Using the Win32::ActAcc
          > package, I tried converting the window into an AO and iterate it.
          > But nothing meangingful showed up:


          AFAIK TreeView32 is and MFC thingy and as far as I can tell Win32::GuiTest
          cannot yet handle that.

          I have not seen this Win32::ActAcc earlier I'll check it out too once I
          have a bit more time again with windows testing stuff.

          In the meantime I am sure lot's of people here will appreciate if you can
          come up with some solution, even a partial solution.

          Gabor

          Yahoo! Groups SponsorADVERTISEMENT


          ---------------------------------
          Yahoo! Groups Links

          To visit your group on the web, go to:
          http://groups.yahoo.com/group/perlguitest/

          To unsubscribe from this group, send an email to:
          perlguitest-unsubscribe@yahoogroups.com

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




          ---------------------------------
          Do you Yahoo!?
          Check out the new Yahoo! Front Page. www.yahoo.com/a

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.