Page 1 of 1

Web browser snapshot?

PostPosted: Thu Jan 07, 2016 2:26 pm
by stu
Hi there,

I got a small 150 x 80 web browser object and I was wondering if its possible to take a snapshot of it (its withing a 800x600 pub) and keep it on clipboard, or memory or store somewhere, whatever is easy, really...

Regards.

Re: Web browser snapshot?

PostPosted: Thu Jan 07, 2016 2:34 pm
by Gaev
Stu:

Take a look at NeoBookScreenCapture over here ... http://www.neosoftware.com/nbwplugins.html#plugins

Re: Web browser snapshot?

PostPosted: Thu Jan 07, 2016 2:44 pm
by stu
Hi there!

Yeah I did, but its capturing outside the pub (?)...

I dont know how to get the object position in relation to the screen size... Or maybe something else...

I tried this:

Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
GetObjectInfo "WebBrowser1" "Left" "[L]"
GetObjectInfo "WebBrowser1" "Top" "[T]"
nscCaptureArea "[L]" "[T]" "130" "80" "[PubDir]temp.jpg" "100"
ImageWindow "TempImg" "-1" "-1" "[PubDir]temp.jpg"
Parsed in 0.006 seconds, using GeSHi 1.0.8.10

Re: Web browser snapshot?

PostPosted: Thu Jan 07, 2016 3:05 pm
by Gaev
Stu:

Yeah I did, but its capturing outside the pub (?)...
I dont know how to get the object position in relation to the screen size... Or maybe something else...

Yes, it was designed to facilitate capture of anything/everything on the screen ... even outside the NeoBook Application Window.

In order to capture specific objects within your NeoBook Application Window, you need to further calibrate the Top/Left position of your Application's Window using ...
[PubLeft]
[PubTop]

The position of the upper left corner of the interior of the publication window (the client area) in screen coordinates. These values can be added to the coordinates of an object to determine its absolute position relative to the entire screen.


Try ...
Code: Select all
GetObjectInfo "WebBrowser1" "Left" "[L]"
GetObjectInfo "WebBrowser1" "Top" "[T]"
Setvar "[CaptureLeft]" "[PubLeft]+[L]"
SetVar "[CaptureTop]" "[PubTop]+[T]"
nscCaptureArea "[CaptureLeft]" "[CaptureTop]" "130" "80" "[PubDir]temp.jpg" "100"
ImageWindow "TempImg" "-1" "-1" "[PubDir]temp.jpg"

Re: Web browser snapshot?

PostPosted: Thu Jan 07, 2016 3:09 pm
by stu
Gaev wrote:Stu:

Yeah I did, but its capturing outside the pub (?)...
I dont know how to get the object position in relation to the screen size... Or maybe something else...

Yes, it was designed to facilitate capture of anything/everything on the screen ... even outside the NeoBook Application Window.

In order to capture specific objects within your NeoBook Application Window, you need to further calibrate the Top/Left position of your Application's Window using ...
[PubLeft]
[PubTop]

The position of the upper left corner of the interior of the publication window (the client area) in screen coordinates. These values can be added to the coordinates of an object to determine its absolute position relative to the entire screen.


Try ...
Code: Select all
GetObjectInfo "WebBrowser1" "Left" "[L]"
GetObjectInfo "WebBrowser1" "Top" "[T]"
Setvar "[CaptureLeft]" "[PubLeft]+[L]"
SetVar "[CaptureTop]" "[PubTop]+[T]"
nscCaptureArea "[CaptureLeft]" "[CaptureTop]" "130" "80" "[PubDir]temp.jpg" "100"
ImageWindow "TempImg" "-1" "-1" "[PubDir]temp.jpg"


Absolutely yes, you the man.

Thank you sir!