in reply to Re^3: Win32::GuiTest - Processing screen captures in memory?
in thread Win32::GuiTest - Processing screen captures in memory?

All the functions can be used either with their full name (eg. Win32::Clipboard::Get) or as methods of a Win32::Clipboard object.

That said, I did try it as an object anyways, and got the same result again.

If you call the IsBitmap() function, does it recognize the clipboard image on your system?

I've also gone and updated everything available through PPM, and reinstalled guitest and clipboard to be sure I've got the latest. Running XP, in case that matters.

  • Comment on Re^4: Win32::GuiTest - Processing screen captures in memory?

Replies are listed 'Best First'.
Re^5: Win32::GuiTest - Processing screen captures in memory?
by BrowserUk (Patriarch) on Mar 20, 2011 at 06:05 UTC
    If you call the IsBitmap() function, does it recognize the clipboard image on your system?

    Yes. I'm using AS1007 64-bit on Vista64. and version 0.55 of Win32::Clipboard:

    #! perl -slw use strict; use Win32::Clipboard; my $cb = Win32::Clipboard->new(); print $cb->IsBitmap() ? 'Yes' : 'No'; my $bmp = $cb->GetBitmap; open O, '>:raw', 'junk.bmp' or die $!; print O $bmp; close O; system 'junk.bmp'; __END__ c:\test>clipBMP.pl Yes c:\test>perl -MWin32::Clipboard -E"say $Win32::Clipboard::VERSION" 0.55

    I'm putting an image onto the clipbard using Alt-printscreen.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      If I use the printscreen key, clipboard can see it just fine, but it can't see the results of the $ds->ToClipboard() function.

      Doing the cropping myself is certainly better than going to disk, so this should be a big improvement.

        but it can't see the results of the $ds->ToClipboard() function.

        Strange that you can save the bmp to disk but not to the clipboard? I'd suggest that you raise a bug against Win32::GUITest.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.