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

RE: [perlguitest] FindChildWindowByClass

Expand Messages
  • Chris Hilton
    You can do this with the existing FindWindowLike() function, you just need to set the third parameter appropriately. Just AfxFrameOnView42 will work for your
    Message 1 of 5 , Sep 7, 2005
      You can do this with the existing FindWindowLike() function, you just
      need to set the third parameter appropriately. Just "AfxFrameOnView42"
      will work for your case.

      ===
      FindWindowLike($window,$titleregex,$classregex,$childid,$maxlevel)

      Finds the window handles of the windows matching the specified
      parameters and returns them as a list.

      You may specify the handle of the window to search under. The
      routine searches through all of this windows children and their children
      recursively. If 'undef' then the routine searches through all windows.
      There is also a regexp used to match against the text in the window
      caption and another regexp used to match against the text in the window
      class. If you pass a child ID number, the functions will only match
      windows with this id. In each case undef matches everything.
      ===

      Chris Hilton

      > -----Original Message-----
      > From: perlguitest@yahoogroups.com
      > [mailto:perlguitest@yahoogroups.com] On Behalf Of ben_cuthbert
      > Sent: Wednesday, 07 September, 2005 11:31
      > To: perlguitest@yahoogroups.com
      > Subject: [perlguitest] FindChildWindowByClass
      >
      > Would it be possible to add a function to do a find window by
      > class that would allow people to pickup controls like
      > "AfxFrameOnView42 "
      >
      > http://www.mp2kmag.com/mappoint/discussion/viewtopic.asp?p=4863
    • ben_cuthbert
      I did try that search with the following code, and it does not seem to return anything. @w = FindWindowLike(undef,undef, AfxFrameOnView42 ,undef,undef);
      Message 2 of 5 , Sep 8, 2005
        I did try that search with the following code, and it does not seem to
        return anything.

        @w = FindWindowLike(undef,undef,"AfxFrameOnView42",undef,undef);
        foreach(@w) {
        printf "$_\n";
        }

        C:\BensHome\BensPerl>perl test.pl

        C:\BensHome\BensPerl>

        --- In perlguitest@yahoogroups.com, "Chris Hilton" <chilton@a...> wrote:
        > You can do this with the existing FindWindowLike() function, you just
        > need to set the third parameter appropriately. Just "AfxFrameOnView42"
        > will work for your case.
        >
        > ===
        > FindWindowLike($window,$titleregex,$classregex,$childid,$maxlevel)
        >
        > Finds the window handles of the windows matching the specified
        > parameters and returns them as a list.
        >
        > You may specify the handle of the window to search under. The
        > routine searches through all of this windows children and their children
        > recursively. If 'undef' then the routine searches through all windows.
        > There is also a regexp used to match against the text in the window
        > caption and another regexp used to match against the text in the window
        > class. If you pass a child ID number, the functions will only match
        > windows with this id. In each case undef matches everything.
        > ===
        >
        > Chris Hilton
        >
        > > -----Original Message-----
        > > From: perlguitest@yahoogroups.com
        > > [mailto:perlguitest@yahoogroups.com] On Behalf Of ben_cuthbert
        > > Sent: Wednesday, 07 September, 2005 11:31
        > > To: perlguitest@yahoogroups.com
        > > Subject: [perlguitest] FindChildWindowByClass
        > >
        > > Would it be possible to add a function to do a find window by
        > > class that would allow people to pickup controls like
        > > "AfxFrameOnView42 "
        > >
        > > http://www.mp2kmag.com/mappoint/discussion/viewtopic.asp?p=4863
      • Piotr Kaluski
        As far as I know it should be AfxFrameOrView42 not AfxFrameOnView42 ( Or rather then On ). -Piotr ... to ... just ... Just AfxFrameOnView42 ... children
        Message 3 of 5 , Sep 8, 2005
          As far as I know it should be AfxFrameOrView42 not AfxFrameOnView42
          ("Or" rather then "On").
          -Piotr

          --- In perlguitest@yahoogroups.com, "ben_cuthbert"
          <ben_cuthbert@y...> wrote:
          > I did try that search with the following code, and it does not seem
          to
          > return anything.
          >
          > @w = FindWindowLike(undef,undef,"AfxFrameOnView42",undef,undef);
          > foreach(@w) {
          > printf "$_\n";
          > }
          >
          > C:\BensHome\BensPerl>perl test.pl
          >
          > C:\BensHome\BensPerl>
          >
          > --- In perlguitest@yahoogroups.com, "Chris Hilton" <chilton@a...>
          wrote:
          > > You can do this with the existing FindWindowLike() function, you
          just
          > > need to set the third parameter appropriately.
          Just "AfxFrameOnView42"
          > > will work for your case.
          > >
          > > ===
          > > FindWindowLike($window,$titleregex,$classregex,$childid,$maxlevel)
          > >
          > > Finds the window handles of the windows matching the specified
          > > parameters and returns them as a list.
          > >
          > > You may specify the handle of the window to search under. The
          > > routine searches through all of this windows children and their
          children
          > > recursively. If 'undef' then the routine searches through all
          windows.
          > > There is also a regexp used to match against the text in the
          window
          > > caption and another regexp used to match against the text in the
          window
          > > class. If you pass a child ID number, the functions will only
          match
          > > windows with this id. In each case undef matches everything.
          > > ===
          > >
          > > Chris Hilton
          > >
          > > > -----Original Message-----
          > > > From: perlguitest@yahoogroups.com
          > > > [mailto:perlguitest@yahoogroups.com] On Behalf Of ben_cuthbert
          > > > Sent: Wednesday, 07 September, 2005 11:31
          > > > To: perlguitest@yahoogroups.com
          > > > Subject: [perlguitest] FindChildWindowByClass
          > > >
          > > > Would it be possible to add a function to do a find window by
          > > > class that would allow people to pickup controls like
          > > > "AfxFrameOnView42 "
          > > >
          > > > http://www.mp2kmag.com/mappoint/discussion/viewtopic.asp?p=4863
        • ben_cuthbert
          Sorry about that, changed it and i got some info back..... So once i have found the class id etc, how do i show what information is in that frame, is their a
          Message 4 of 5 , Sep 8, 2005
            Sorry about that, changed it and i got some info back.....

            So once i have found the class id etc, how do i show what information
            is in that frame, is their a GetFrameInfo function,


            --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@p...> wrote:
            > As far as I know it should be AfxFrameOrView42 not AfxFrameOnView42
            > ("Or" rather then "On").
            > -Piotr
            >
            > --- In perlguitest@yahoogroups.com, "ben_cuthbert"
            > <ben_cuthbert@y...> wrote:
            > > I did try that search with the following code, and it does not seem
            > to
            > > return anything.
            > >
            > > @w = FindWindowLike(undef,undef,"AfxFrameOnView42",undef,undef);
            > > foreach(@w) {
            > > printf "$_\n";
            > > }
            > >
            > > C:\BensHome\BensPerl>perl test.pl
            > >
            > > C:\BensHome\BensPerl>
            > >
            > > --- In perlguitest@yahoogroups.com, "Chris Hilton" <chilton@a...>
            > wrote:
            > > > You can do this with the existing FindWindowLike() function, you
            > just
            > > > need to set the third parameter appropriately.
            > Just "AfxFrameOnView42"
            > > > will work for your case.
            > > >
            > > > ===
            > > > FindWindowLike($window,$titleregex,$classregex,$childid,$maxlevel)
            > > >
            > > > Finds the window handles of the windows matching the specified
            > > > parameters and returns them as a list.
            > > >
            > > > You may specify the handle of the window to search under. The
            > > > routine searches through all of this windows children and their
            > children
            > > > recursively. If 'undef' then the routine searches through all
            > windows.
            > > > There is also a regexp used to match against the text in the
            > window
            > > > caption and another regexp used to match against the text in the
            > window
            > > > class. If you pass a child ID number, the functions will only
            > match
            > > > windows with this id. In each case undef matches everything.
            > > > ===
            > > >
            > > > Chris Hilton
            > > >
            > > > > -----Original Message-----
            > > > > From: perlguitest@yahoogroups.com
            > > > > [mailto:perlguitest@yahoogroups.com] On Behalf Of ben_cuthbert
            > > > > Sent: Wednesday, 07 September, 2005 11:31
            > > > > To: perlguitest@yahoogroups.com
            > > > > Subject: [perlguitest] FindChildWindowByClass
            > > > >
            > > > > Would it be possible to add a function to do a find window by
            > > > > class that would allow people to pickup controls like
            > > > > "AfxFrameOnView42 "
            > > > >
            > > > > http://www.mp2kmag.com/mappoint/discussion/viewtopic.asp?p=4863
          Your message has been successfully submitted and would be delivered to recipients shortly.