Jump to content
Sign in to follow this  

ScreenCapture + Full page of IE Embedded

Recommended Posts


Hi there! ;)

I'm using IE Embedded into a GUI and I want to make a screencapture from all the IE actual page. Not only the part that is currently visible!


Posted Image


Posted Image

Is this possible?

I've already tryed using _ScreenCapture_CaptureWnd B)

Thanks! :)

Share this post

Link to post
Share on other sites

This is one try from eukalyptus

#cs **************************************************************************

 kompletter Screenshot einer Webseite


#ce **************************************************************************

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <GDIPlus.au3>
#include <ScreenCapture.au3>

Global [email="$iDX=@DesktopWidth"]$iDX=@DesktopWidth[/email]
Global [email="$iDY=@DesktopHeight"]$iDY=@DesktopHeight[/email]

SplashTextOn("Erstelle Snapshot","Bitte warten...",250,70)

$oIE = _IECreateEmbedded()
$hGUI=GUICreate("Embedded Web control Test", $iDX, $iDY,0,0,BitOR($WS_CLIPCHILDREN, $WS_POPUP));,$WS_EX_TOPMOST)
$hObj=GUICtrlCreateObj($oIE, -2, -2, $iDX+4, $iDY+4)



$oIE.document.body.Scroll = "no"
$oIE.document.body.style.border = "0px"
If $iX < $oIE.document.body.clientWidth Then $iX=$oIE.document.body.clientWidth
If $iY < $oIE.document.body.clientHeight Then $iY=$oIE.document.body.clientHeight
If $iX < $iDX Then $iX=$iDX
If $iY < $iDY Then $iY=$iDY

$tempGraph = _GDIPlus_GraphicsCreateFromHWND(_WinAPI_GetDesktopWindow())
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iX,$iY,$tempGraph)
$hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap)

For $i=0 To $iSX
    For $j=0 To $iSY
        _ScreenCapture_CaptureWnd(@TempDir & "\TempSnapshot.bmp",$hGUI,0,0,-1,-1,False)
        $hImage=_GDIPlus_ImageLoadFromFile(@TempDir & "\TempSnapshot.bmp")
        If $i=$iSX Then $iTX-=$iDX-$iRX
        If $j=$iSY Then $iTY-=$iDY-$iRY
_GDIPlus_ImageSaveToFile($hBitmap,@ScriptDir & "\Snapshot.bmp")
FileDelete(@TempDir & "\TempSnapshot.bmp")

Look here: http://www.autoit.de/index.php?page=Thread&threadID=9818 (German!)

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this