Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^3: Screen Capture via wxPerl Script

by jmlynesjr (Hermit)
on Oct 20, 2012 at 02:14 UTC ( #1000078=note: print w/replies, xml ) Need Help??

in reply to Re^2: Screen Capture via wxPerl Script
in thread Screen Capture via wxPerl Script

We may be talking apples and oranges, but I am enjoying and learning from this conversation.

My definition of "main-line code" is the stuff between my $app = Wx::SimpleApp->new; and $app->MainLoop;.

Within this segment, the frame is created and the onPaint event handler is defined. onPaint is never called directly, but is called "asynchronously" from within the bowels of Wx. I moved the TakeScreenshot($self, $file); call to various places within the main-line and onPaint segments with various results. Usually only capturing the background window not the sample window.

The sample screen is drawn by a continuous block of code(within the onPaint event handler)immediately followed by TakeScreenshot. On my PC, the screen doesn't paint completely in one motion, but paints the three circles and the first block of text followed by a blink and the next two blocks of text. Given this, it is strange that some of the time a complete screen is captured to the file. Mostly only the three circles and first block of text gets captured. All the drawing code runs before the capture code is called, so the $64,000 question is why is only a partial screen being captured(most of the time)? As Spock would say, "illogical".

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000078]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-06-22 05:45 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (121 votes). Check out past polls.