Der Screenshotter erstellt einen Screenshot des aktuellen Bildschirms.
Viel Spass:
Spoiler anzeigen
#include <GDIPlus.au3>
#include <ScreenCapture.au3>
#include <GuiConstantsEx.au3>
global $do
global $msg
global $counter
global $close = 0
global $do2
$do = 0
$do2 = 10
$create = GUICreate('Screenshotter')
$closeb = GUICtrlCreateButton('Beenden', 10, 350)
$msg = GUISetState()
$text = GUICtrlCreateLabel('Willkommen bei Screenshotter. Wie der Name schon sagt können sie mit diesem'& @CRLF & 'Programm Screenshots erstellen. Einfach den Speicherpfad angeben,' & @CRLF & 'und Los gehts.', 10, 10)
$cbox = GUICtrlCreateCheckbox('Screenshot in Paint laden', 20, 60, default, default)
$text2 = GUICtrlCreateLabel('Bitte den Speicherpfad angeben:', 10, 100)
$pfad = GUICtrlCreateInput('' & @MyDocumentsDir, 10, 120)
$button = GUICtrlCreateButton('Screenshot aufnehmen', 10, 190)
do
$msg = guigetmsg()
if $do <> 10 then
if $msg = $cbox then
$do2 = 1
endif
endif
if $do2 = 1 then
$msg = GUIGetMsg()
if $msg = $cbox then $do2 = 0
EndIf
if $msg = $button then $do = 5
if $do = 5 Then
WinSetState('Screenshotter', '', @SW_MINIMIZE)
Sleep(500)
Opt("MustDeclareVars", 1)
[/autoit] [autoit][/autoit] [autoit]Global $hBitmap, $hImage, $sCLSID, $tData, $tParams
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_ScreenCapture_Capture(guictrlread($pfad) & '\Screenshotter.jpg')
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_GDIPlus_StartUp()
[/autoit] [autoit][/autoit] [autoit]$hImage = _GDIPlus_ImageLoadFromFile(guictrlread($pfad) & '\Screenshotter.jpg')
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_GDIPlus_ImageSaveToFileEx($hImage, guictrlread($pfad) & '\Screenshotter.jpg', $sCLSID, DllStructGetPtr($tParams))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_GDIPlus_ShutDown()
WinSetState('Screenshotter', '', @SW_RESTORE)
MsgBox(0, 'Done!', 'Der Screenshot wurde erfolgreich unter: ' & guictrlread($pfad) & '\Screenshotter.jpg' & ' gespeichert')
$do = 0
if $do2 = 1 then
Run("MSPaint.exe " & '"' & guictrlread($pfad) & '\Screenshotter.jpg"')
endif
EndIf
until $msg = $GUI_EVENT_CLOSE or $msg = $closeb or $close = -1
MFG Scripter192