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

617Re: DibSect is not working, please help

Expand Messages
  • Dennis K. Paulsen
    Nov 3, 2004
    • 0 Attachment
      Hello,

      The following example works for me... Note the case sensitivity
      of "Win32::GuiTest"...


      #!/usr/bin/perl -w

      use Win32::GuiTest qw(:ALL);


      $ds = new Win32::GuiTest::DibSect;


      my @windows = FindWindowLike(0, "C",0); #, "^XLMAIN\$");
      for (@windows) {
      SetForegroundWindow($_);
      $ds->CopyWindow($_);
      $ds->ToGrayScale();
      $ds->SaveAs("c:\\bla.bmp");
      $ds->ToClipboard();
      }



      Regards,
      Dennis K. Paulsen

      --- In perlguitest@yahoogroups.com, "snikki326" <snikki326@y...>
      wrote:
      >
      >
      > Hello,
      >
      > I get an error when I try to use Win32::GUITest::DibSect
      >
      > For example:
      > -----------------------------
      > #!/usr/bin/perl -w
      > use Win32::GUITest;
      >
      > $ds = new Win32::GUITest::DibSect;
      >
      > my @windows = FindWindowLike(0, "MY WINDOW",0); #, "^XLMAIN\$");
      > for (@windows) {
      > SetForegroundWindow($_);
      > $ds->CopyWindow($_);
      > $ds->ToGrayScale();
      > $ds->SaveAs("c:\bla.bmp");
      > $ds->ToClipboard();
      > }
      > -----------------------------
      >
      > However, the script crashes on:
      > $ds = new Win32::GUITest::DibSect;
      >
      > The error message is:
      > Can't locate object method "new" via
      > package "Win32::GUITest::DibSect" (perhaps you forgot to
      > load "Win32::GUITest::DibSect"?) at testDibSect.pl line 5.
      >
      > Which is a very elementary error. It means that DibSect is not
      > there.
      >
      > Can anyone suggest any way of getting DibSect to work? The only
      > reference I can find is http://search.cpan.org/~ctrondlp/Win32-
      > GuiTest-1.50.2-ad/guitest.pm
      >
      >
      > And that is very sparse at best.
      >
      > Anyone know how to get documentation on DibSect?
      >
      > Thanks!
    • Show all 11 messages in this topic