Jump to content

Search the Community

Showing results for tags '_screencapture_capturewnd'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. The _ScreenCapture_CaptureWnd() logic may have an issue in v3.3.14.3. I was testing scripts using v3.3.14.3 and saw that the scripts' screen captures weren't getting created. I immediately ran the scripts using v3.3.14.2 and the screen captures were being created as expected. The _ScreenCapture_CaptureWnd() function, in v3.3.14.3, returns @error = -2. Can anyone else confirm that they are seeing the same issue? Below is a slightly modified version of the function's help file's _ScreenCapture_CaptureWnd() example that should allow you to recreate the issue. #include <Constants.au3> #include <ScreenCapture.au3> Example() Func Example() Local $hGUI ; Create GUI $hGUI = GUICreate("Screen Capture", 400, 300) GUISetState(@SW_SHOW) Sleep(250) ; Capture window _ScreenCapture_CaptureWnd(@TempDir & "\GDIPlus_Image.jpg", $hGUI) If @error Then MsgBox($MB_ICONERROR, "", _ "_ScreenCapture_CaptureWnd() failed." & @CRLF & @CRLF & _ "@error = " & @error _ ) Exit 1 EndIf ShellExecute(@TempDir & "\GDIPlus_Image.jpg") EndFunc ;==>Example
  2. Hey Guys, I want to display the client window but when I use _ScreenCapture_CaptureWnd it captures the border and title bar and everything with it. Im trying to find coordinates of things relative to that client but I cant get it relative to the client becasue the window border is imaged too. I found a previous topic on the forums but the question was never answered. Any ideas? This is how I changed the example within the help file: Func Example() Local $hGUI, $hBMP, $hBitmap, $hGraphic, $hImage, $iX, $iY, $hClone, $fileloc=@ScriptDir&"\SOMEclient.bmp",$iLeft,$iTop,$iRight,$iBottom,$bCursor ; Create GUI $hGUI = GUICreate("GDI+", $ClientSize[0], $ClientSize[1]) GUISetState(@SW_SHOW) ; Initialize GDI+ library _GDIPlus_Startup() ; Capture 32 bit bitmap ;$hBMP = _ScreenCapture_Capture("") $hBMP = _ScreenCapture_CaptureWnd ( "" , $hSOMEclientWin ); MY AUGMENTATION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) ; Create 24 bit bitmap clone $iX = _GDIPlus_ImageGetWidth($hImage) $iY = _GDIPlus_ImageGetHeight($hImage) $hClone = _GDIPlus_BitmapCloneArea($hImage, 0, 0, $iX, $iY, $GDIP_PXF24RGB) ; Save bitmap to file _GDIPlus_ImageSaveToFile($hClone, @ScriptDir & "\GDIPlus_Image.bmp") ; Clean up resources _GDIPlus_BitmapDispose($hClone) _GDIPlus_BitmapDispose($hImage) _WinAPI_DeleteObject($hBMP) ; Draw bitmap to GUI $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\GDIPlus_Image.bmp") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) ; Clean up resources _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_BitmapDispose($hBitmap) ; Shut down GDI+ library _GDIPlus_Shutdown() ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example Thanks, Mason
×
×
  • Create New...