Hallo,
dieser Code erstellt einen Screenshot.
Leider mit Rahmen der Gui.
Wie kann ich nur das Bild erhalten?
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ScreenCapture.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 503, 445, 192, 124)
$Name = GUICtrlCreateLabel("Name", 24, 312, 32, 17)
$Input1 = GUICtrlCreateInput("Input1", 72, 312, 121, 21)
$Level = GUICtrlCreateLabel("Level", 312, 312, 30, 17)
$Input2 = GUICtrlCreateInput("Input2", 352, 312, 129, 21)
$Ok = GUICtrlCreateButton("Ok", 216, 352, 75, 25, $WS_GROUP)
$Bild = GUICtrlCreateButton("Bild", 72, 408, 99, 25, $WS_GROUP)
$Beenden = GUICtrlCreateButton("Beenden", 368, 408, 75, 25, $WS_GROUP)
$Pic1 = GUICtrlCreatePic(@ScriptDir&"\augen.jpg", 0, 0, 500, 300, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Ok
GUICtrlCreateLabel(GUICtrlRead($Input1), 256, 32, 234, 46)
GUICtrlSetBkColor(-1, -2)
GUICtrlCreateLabel(GUICtrlRead($Input2), 232, 184, 252, 43)
GUICtrlSetBkColor(-1, -2)
Case $Bild
GUISetState(@SW_HIDE)
$Form1_1 = GUICreate("Form1", 503, 301, 192, 124)
$Pic1 = GUICtrlCreatePic(@ScriptDir&"\augen.jpg", 0, 0, 500, 300, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel(GUICtrlRead($Input1), 256, 32, 82, 46)
GUICtrlSetBkColor(-1, -2)
$eeee = GUICtrlCreateLabel(GUICtrlRead($Input2), 232, 184, 52, 43)
GUICtrlSetBkColor(-1, -2)
GUISetState(@SW_SHOW)
_ScreenCapture_CaptureWnd(@ScriptDir & "\Screenshot.jpg", $Form1_1, 0, 0, -1, -1, true)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndSwitch
WEnd
Grüße
Ilse