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

Re: Listbox functions

Expand Messages
  • xGunneRx <xgunnerx@yahoo.com>
    lol nm i figured it out- my $check = int(0x00350096); ... the ... version.
    Message 1 of 6 , Dec 16, 2002
    • 0 Attachment
      lol nm i figured it out-> my $check = int(0x00350096);



      --- In perlguitest@yahoogroups.com, "xGunneRx <xgunnerx@y...>"
      <xgunnerx@y...> wrote:
      > > 3) Use Win32::GuiTest to print the content of the first item in
      the
      > > list:
      > >
      > > perl -e "use Win32::GuiTest; print Win32::GuiTest::GetListText
      > > (0x000107A4, 0);"
      >
      > Ok that seems to work. However, if I do something like pass a
      > variable into the function it seems to blow up:
      > <snip>
      > #!/usr/bin/perl -w
      > use strict;
      > use Win32::GuiTest qw(:ALL);
      >
      > my $check = '0x00350096';
      >
      > my $w = GetListText($check, 0);
      > print "$w\n";
      > </snip>
      >
      > This prints "uiTest" which is not in the list. Seems to do this for
      > any listbox I define in $check. Im using the latest non-beta
      version.
      >
      > Thanks!
      > xGunneRx
    • xGunneRx <xgunnerx@yahoo.com>
      The below works... however: my $self = shift; my $check = $self- {Org_ListBoxID}; # check contains the listbox id $check = int($check); $word =
      Message 2 of 6 , Dec 16, 2002
      • 0 Attachment
        The below works... however:

        <snip>
        my $self = shift;
        my $check = $self->{Org_ListBoxID}; # check contains the listbox id
        $check = int($check);
        $word = GetListText($check, 0);
        print $word . "\n";
        </snip>

        Prints garble. What am I doing wrong?

        --- In perlguitest@yahoogroups.com, "xGunneRx <xgunnerx@y...>"
        <xgunnerx@y...> wrote:
        > lol nm i figured it out-> my $check = int(0x00350096);
        >
        >
        >
        > --- In perlguitest@yahoogroups.com, "xGunneRx <xgunnerx@y...>"
        > <xgunnerx@y...> wrote:
        > > > 3) Use Win32::GuiTest to print the content of the first item in
        > the
        > > > list:
        > > >
        > > > perl -e "use Win32::GuiTest; print Win32::GuiTest::GetListText
        > > > (0x000107A4, 0);"
        > >
        > > Ok that seems to work. However, if I do something like pass a
        > > variable into the function it seems to blow up:
        > > <snip>
        > > #!/usr/bin/perl -w
        > > use strict;
        > > use Win32::GuiTest qw(:ALL);
        > >
        > > my $check = '0x00350096';
        > >
        > > my $w = GetListText($check, 0);
        > > print "$w\n";
        > > </snip>
        > >
        > > This prints "uiTest" which is not in the list. Seems to do this
        for
        > > any listbox I define in $check. Im using the latest non-beta
        > version.
        > >
        > > Thanks!
        > > xGunneRx
      • Dennis K. Paulsen <ctrondlp@netins.net>
        GetListText s first parameter needs to be the handle to the list box not the control id. The handle of the control can be obtained through FindWindowLike by
        Message 3 of 6 , Dec 17, 2002
        • 0 Attachment
          GetListText's first parameter needs to be the handle to the list box
          not the control id. The handle of the control can be obtained
          through FindWindowLike by specifying its fourth parameter.

          Regards,
          Dennis K. Paulsen

          --- In perlguitest@yahoogroups.com, "xGunneRx <xgunnerx@y...>"
          <xgunnerx@y...> wrote:
          > The below works... however:
          >
          > <snip>
          > my $self = shift;
          > my $check = $self->{Org_ListBoxID}; # check contains the listbox id
          > $check = int($check);
          > $word = GetListText($check, 0);
          > print $word . "\n";
          > </snip>
          >
          > Prints garble. What am I doing wrong?
          >
          > --- In perlguitest@yahoogroups.com, "xGunneRx <xgunnerx@y...>"
          > <xgunnerx@y...> wrote:
          > > lol nm i figured it out-> my $check = int(0x00350096);
          > >
          > >
          > >
          > > --- In perlguitest@yahoogroups.com, "xGunneRx <xgunnerx@y...>"
          > > <xgunnerx@y...> wrote:
          > > > > 3) Use Win32::GuiTest to print the content of the first item
          in
          > > the
          > > > > list:
          > > > >
          > > > > perl -e "use Win32::GuiTest; print Win32::GuiTest::GetListText
          > > > > (0x000107A4, 0);"
          > > >
          > > > Ok that seems to work. However, if I do something like pass a
          > > > variable into the function it seems to blow up:
          > > > <snip>
          > > > #!/usr/bin/perl -w
          > > > use strict;
          > > > use Win32::GuiTest qw(:ALL);
          > > >
          > > > my $check = '0x00350096';
          > > >
          > > > my $w = GetListText($check, 0);
          > > > print "$w\n";
          > > > </snip>
          > > >
          > > > This prints "uiTest" which is not in the list. Seems to do this
          > for
          > > > any listbox I define in $check. Im using the latest non-beta
          > > version.
          > > >
          > > > Thanks!
          > > > xGunneRx
        Your message has been successfully submitted and would be delivered to recipients shortly.