• Der Screenshotter erstellt einen Screenshot des aktuellen Bildschirms.

    Viel Spass:

    Spoiler anzeigen
    [autoit]


    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <GuiConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    global $do
    global $msg
    global $counter
    global $close = 0
    global $do2

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $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

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    if $do = 5 Then
    WinSetState('Screenshotter', '', @SW_MINIMIZE)
    Sleep(500)

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]


    MFG Scripter192 :rock:

  • Hab auch mal sowas gemacht, mit meiner WinFX-UDF:

    Spoiler anzeigen
    [autoit]

    ;~ #include <WinFX.au3>
    ;WinFX.au3-Funktion: FlashDesktop:
    Func _WinFX_FlashDesktop($iSpeed=3,$hColor=0xffffff)
    ;Remarks: Don't use AdLib with this
    GUICreate("Flash",@DesktopWidth,@DesktopHeight,0,0,0x80000000,0x00000080)
    GUISetBkColor($hColor)
    WinSetTrans("Flash","",240)
    GUISetState()
    For $i=100 To 255 step 5
    WinSetTrans("Flash","",$i)
    Next
    For $i=255 To 0 step -$iSpeed
    WinSetTrans("Flash","",$i)
    Next
    if not @error then return true
    EndFunc
    #include <Screencapture.au3>
    HotKeySet("{PRINTSCREEN}","_screen")
    If not FileExists("D:\Files\Screenshots\") Then DirCreate("D:\Files\Screenshots\")
    Func _screen()
    HotKeySet("{PRINTSCREEN}")
    $i=1
    While FileExists("D:\Files\Screenshots\pic" & $i & ".jpg")
    $i += 1
    WEnd
    _ScreenCapture_Capture("D:\Files\Screenshots\pic" & $i & ".jpg")
    _WinFX_FlashDesktop(1)
    HotKeySet("{PRINTSCREEN}","_screen")
    EndFunc
    While True
    sleep(200)
    WEnd

    [/autoit]


    /edit: Sind natürlich noch meine Verzeichnisse, müsste man verallgemeinern...

    Twitter: @L3viathan2142
    Benutze AutoIt persönlich nicht mehr, da ich keinen Windows-Rechner mehr besitze.