1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. UEZ

Beiträge von UEZ

  • Converting image to a defined pallet of colors

    • UEZ
    • 13. März 2019 um 19:26

    Du musst die Zeile 43 anpassen:

    Code
    _GDIPlus_BitmapConvertFormat($hImage, $GDIP_PXF08INDEXED, $GDIP_DitherTypeDualSpiral8x8, $GDIP_PaletteTypeFixedHalftone256, $tPalette)

    Wenn $GDIP_PXF04INDEXED gewählt ist, dann sind nur 2^4 = 16 Farben vorgesehen.

    Beispiel:

    C
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    
    
    Global $sFile = FileOpenDialog("Selecet an image", "", "Images (*.jpg;*.png;*.bmp)")
    If @error Then Exit MsgBox(16, "Error", "You must select an image!", 30)
    
    _GDIPlus_Startup()
    
    $hImage = _GDIPlus_ImageLoadFromFile($sFile)
    $iW = _GDIPlus_ImageGetWidth($hImage)
    $iH = _GDIPlus_ImageGetHeight($hImage)
    $hGUI = GUICreate("GDI+ v1.1 needed", $iW * 2 + 30, $iH + 20)
    GUISetState()
    
    
    $hGraphics1 = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsDrawImageRect($hGraphics1, $hImage, 10, 10, $iW, $iH)
    _GDIPlus_GraphicsDispose($hGraphics1)
    
    $iColors = 32
    
    Local $tPalette = _GDIPlus_PaletteInitialize($iColors, $GDIP_PaletteTypeOptimal, $iColors, False, $hImage)
    ConsoleWrite(@error & @CRLF)
    
    _GDIPlus_BitmapConvertFormat($hImage, $GDIP_PXF08INDEXED, $GDIP_DitherTypeDualSpiral8x8, $GDIP_PaletteTypeFixedHalftone256, $tPalette)
    DllCall($__g_hGDIPDll, "int", "GdipSetImagePalette", "handle", $hImage, "struct*", $tPalette)
    
    $hDC = _WinAPI_GetDC($hGUI)
    $hGraphics2 = _GDIPlus_GraphicsCreateFromHDC($hDC)
    
    _GDIPlus_GraphicsDrawImageRect($hGraphics2, $hImage, $iW + 20, 10, $iW, $iH)
    
    _GDIPlus_ImageSaveToFile($hImage, @ScriptDir & "\" & $iColors & ".png")
    
    ShellExecute(@ScriptDir & "\" & $iColors & ".png")
    
    Do
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                _WinAPI_ReleaseDC($hGUI, $hDC)
                _GDIPlus_GraphicsDispose($hGraphics2)
                _GDIPlus_ImageDispose($hImage)
                _GDIPlus_Shutdown()
                GUIDelete()
                Exit
        EndSwitch
    Until False
    Alles anzeigen
  • Maus / Punktkoordinaten Transformation

    • UEZ
    • 13. März 2019 um 14:18

    Hi,

    ich finde irgendwie nicht die Lösung die 4 Punkte so zu verschieben, sodass dieser Effekt entsteht:

    Parallax Effekt

    Das ist mein bisheriger Code:

    C
    #pragma compile(Icon, "c:\Program Files (x86)\AutoIt3\Icons\au3.ico")
    #AutoIt3Wrapper_Run_Au3Stripper=y
    #Au3Stripper_Parameters=/so /pe /rm
    #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3"
    
    #include <GDIPlus.au3>
    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>
    
    _GDIPlus_Startup()
    Global $hGUI, $hCanvas, $hPen, $iFPS = 0, $iShowFPS = 0, $bExit
    Global Const $iW = 800, $iH = 600, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ Test"
    Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $fDeg = 180 / $fPi
    AutoItSetOption("GUIOnEventMode", 1)
    AutoItSetOption("MouseCoordMode", 0)
    
    GDIPlus_Test()
    
    AutoItSetOption("GUIOnEventMode", 0)
    _GDIPlus_Shutdown()
    
    
    Func GDIPlus_Test()
        $bExit = False
        $hGUI = GUICreate($sTitle, $iW, $iH) ;, 0, 0, $WS_POPUP)
        GUISetState(@SW_SHOW, $hGUI)
    ;~     GUISetCursor(16, 1)
    
        ;create canvas elements
        Local Const $hDC = _WinAPI_GetDC($hGUI)
        Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH)
        Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC)
        Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap)
                    $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer)
        _GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
        _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
    
        Local Const $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xFF000000), _
                    $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xF0A0A0A0), _
                    $hFormat_FPS = _GDIPlus_StringFormatCreate(), _
                    $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _
                    $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _
                    $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16)
    
        $hPen = _GDIPlus_PenCreate(0xFFFFFFFF)
    
        $iFPS = 0
        GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About")
        AdlibRegister("CalcFPS", 1000)
    
        Local $moveForce = 40, $rotateForce = 80, $aMpos, $moveX, $moveY
        Local $tCoords = DllStructCreate("float x1; float y1;float x2; float y2;float x3; float y3;float x4; float y4")
        $tCoords.x1 = 200
        $tCoords.y1 = 100
        $tCoords.x2 = 600
        $tCoords.y2 = 100
        $tCoords.x3 = 200
        $tCoords.y3 = 500
        $tCoords.x4 = 600
        $tCoords.y4 = 500
    
        Do
            DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush_Clr, "float", 0, "float", 0, _
                    "float", $iW, "float", $iH) ;erase canvas background
    
            DrawRect($tCoords, $moveForce, $rotateForce)
    
            _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text
            _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI
    
            $iFPS += 1
            If $bExit Then ExitLoop
        Until Not Sleep(30)
    
        AdlibUnRegister("CalcFPS")
        ;release resources
        _GDIPlus_FontDispose($hFont_FPS)
        _GDIPlus_FontFamilyDispose($hFamily_FPS)
        _GDIPlus_StringFormatDispose($hFormat_FPS)
        _GDIPlus_BrushDispose($hBrush_Clr)
        _GDIPlus_BrushDispose($hBrush_FPS)
        _GDIPlus_GraphicsDispose($hCanvas)
        _WinAPI_SelectObject($hDC_backbuffer, $DC_obj)
        _WinAPI_DeleteDC($hDC_backbuffer)
        _WinAPI_DeleteObject($hHBitmap)
        _WinAPI_ReleaseDC($hGUI, $hDC)
        GUIDelete($hGUI)
    EndFunc   ;==>GDIPlus_Test
    
    Func DrawRect(ByRef $tCoords, $moveForce, $rotateForce)
        Local $aMpos = GUIGetCursorInfo($hGUI)
    
        $moveX = ($aMpos[0] - $iWh) / $iWh * -$moveForce
        $moveY = ($aMpos[1] - $iHh) / $iHh * -$moveForce
    
        $rotateX = -(($aMpos[1] / $iH * $rotateForce * 2) - $rotateForce) * $fRad
        $rotateY = (($aMpos[0] / $iW * $rotateForce * 2) - $rotateForce) * $fRad
    
        ;xy1    xy2
        ;
        ;xy3    xy4
        Local $x1 = $tCoords.x1 + $moveX * Cos($rotateX),     $y1 = $tCoords.y1 + $moveY * Sin($rotateY), _
              $x3 = $tCoords.x3 - $moveX * Cos(-$rotateX),     $y3 = $tCoords.y3 - $moveY * Sin(-$rotateY), _
              $x2 = $tCoords.x2 + $moveX * Sin($rotateX),     $y2 = $tCoords.y2 + $moveY * Cos($rotateY), _
              $x4 = $tCoords.x4 - $moveX * Sin(-$rotateX),     $y4 = $tCoords.y4 - $moveY * Cos(-$rotateY)
    
        _GDIPlus_GraphicsDrawLine($hCanvas, $x1, $y1, $x2, $y2, $hPen)
        _GDIPlus_GraphicsDrawLine($hCanvas, $x3, $y3, $x4, $y4, $hPen)
    
        _GDIPlus_GraphicsDrawLine($hCanvas, $x1, $y1, $x3, $y3, $hPen)
        _GDIPlus_GraphicsDrawLine($hCanvas, $x2, $y2, $x4, $y4, $hPen)
    
    EndFunc
    
    
    Func _Exit_About()
        $bExit = True
    EndFunc   ;==>_Exit_About
    
    Func CalcFPS() ;display FPS
        $iShowFPS = $iFPS
        $iFPS = 0
    EndFunc   ;==>CalcFPS
    Alles anzeigen

    Hat jemand die Idee, wie ich die 4 Punkte gemäß des CodePen Demos bewegen kann?

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 12. März 2019 um 14:28
    Zitat von Bitnugger

    ..."Screenshot a Web Site" liefert bei mir nur ein komplett schwarzes Bild... habe mehrere Seiten versucht.

    Genau liegt die Krux mit 1809. ;)

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 12. März 2019 um 10:46
    Zitat von Bitnugger

    Bei mir funktioniert es mit der 1809... linkes Bild ist mit Windows Screenshooter gemacht...

    1809.png  Win_10_1809.png

    ...bekomme allerdings einen Fehler, wenn ich die Taste "druck" benutze, die bei mir von SnagIt belegt ist.

    Bitnugger Danke für's testen, aber wie hast du das Bild erstellt? Mit der "Grab Screen" oder "Screenshot a Web Site" Funktion?

    Tweaky Benutzt du den Screenshooter eigentlich regelmäßig?

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 10. März 2019 um 21:48

    Tweaky : nope, immer noch 1803.

  • Gradientenverlauf mit Multi Colored Maker

    • UEZ
    • 7. März 2019 um 23:34

    Die 4 Hauptfarben kennst du ja. Um die Zwischenfaben zu bekommen, musst du wohl einmal eine Zeile mit den Farben auslesen und sie in ein Array speichern. Sollten 600 Einträge sein, dann hast du alle Farben inkl. der 4 definierten Farben.

    Geht am schnellsten mit _GDIPlus_BitmapLockBits().

  • Gradientenverlauf mit Multi Colored Maker

    • UEZ
    • 7. März 2019 um 23:13

    Den Farbverlauf würde ich so machen:

    C
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    
    Example()
    
    Func Example()
        _GDIPlus_Startup() ;initialize GDI+
        Local Const $iWidth = 600, $iHeight = 600, $iBgColor = 0x303030 ;$iBGColor format RRGGBB
    
        Local $hGUI = GUICreate("GDI+ Example (" & @ScriptName & ")", $iWidth, $iHeight) ;create a test GUI
        GUISetBkColor($iBgColor, $hGUI) ;set GUI background color
        GUISetState(@SW_SHOW)
    
        Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;create a graphics object from a window handle
        _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;sets the graphics object rendering quality (antialiasing)
        Local $hBrush = _GDIPlus_LineBrushCreate(0, 0, 600, 0, 0, 0) ;create linear gradient flipped brush
    
        Local $aInterpolations[5][2] ;define the interpolated colors and positions
        $aInterpolations[0][0] = 4
        $aInterpolations[1][0] = 0xFFFF0000 ;Red
        $aInterpolations[1][1] = 0 ;0% from the left
        $aInterpolations[2][0] = 0xFF00FF00 ;Green
        $aInterpolations[2][1] = 0.3 ;To 30% from the left
        $aInterpolations[3][0] = 0xFF0000FF ;Blue
        $aInterpolations[3][1] = 0.7 ;To 70% from the left
        $aInterpolations[4][0] = 0xFFFFFF00 ;Yellow
        $aInterpolations[4][1] = 1 ;To 100% from the left
    
        _GDIPlus_LineBrushSetPresetBlend($hBrush, $aInterpolations) ;set the linear gradient brush colors and position
    
        _GDIPlus_GraphicsFillRect($hGraphics, 0, 295, 600, 10, $hBrush)
    
    
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
    
        ;cleanup GDI+ resources
        _GDIPlus_BrushDispose($hBrush)
        _GDIPlus_GraphicsDispose($hGraphics)
        _GDIPlus_Shutdown()
        GUIDelete($hGUI)
    EndFunc   ;==>Example
    Alles anzeigen
  • Setup-Programm schreiben

    • UEZ
    • 18. Februar 2019 um 08:51

    @Musashi Danke für den Hinweis. Der Link zur Datei sollte jetzt gefixt sein. Der Unterschied zwischen beiden Version ist eher "kosmetisch", daher war mir der Aufwand zu hoch die Topics zu aktualisieren.

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 10. Februar 2019 um 18:47

    JensSchwartz Danke für deine Rückmeldung.

    In der Tat habe ich vergessen den Pfad anzupassen. Sollte aber kein Problem sein dies entsprechend anzupassen. :)

    Leider läuft das Skript nur als x86! Wenn du es als x64 startest, dann stürzt das Skript ab, da einige eingebettete Funktionen nur als x86 laufen (DLL, ASM).

    Funktioniert das Skript als x86 bei dir?

  • WM 2018 Tipp Spiel

    • UEZ
    • 25. Januar 2019 um 16:17
    Zitat von tulaygeisel

    Könnte man sowas nicht nur für Fußball, sondern für alle Ballsportarten machen? Also WM und EM.

    Keine Ahnung, ob Kicktipp auch andere Sportarten unterstützt. Ich persönlich bin eher der Fussball interessierte. I.d.R. öffne ich auch für EM/WM/Bundesliga Wettbewerbe jeweils ein eigenes Tippspiel.

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 3. Januar 2019 um 14:32

    Falls der Code nicht direkt mit der Beta 3.3.15.0 läuft, dann einfach die Funktion _GDIPlus_ImageSaveAdd() in der UDF _GDIPlus_GIFAnim.au3 wieder "einschalten", die auskommentiert sein sollte.

    Hier die anderen 2 Funktionen:

    Code
    ; #FUNCTION# ====================================================================================================================
    ; Author ........: Authenticity
    ; Modified ......: Eukalyptus
    ; ===============================================================================================================================
    Func _GDIPlus_ImageAttributesSetRemapTable($hImageAttributes, $aColorMap = 0, $iColorAdjustType = 0, $bEnable = True)
        Local $aResult
    
        If IsArray($aColorMap) Then
            Local $iCount = $aColorMap[0][0]
            Local $tColorMap = DllStructCreate("uint[" & $iCount * 2 & "]")
    
            For $i = 1 To $iCount
                DllStructSetData($tColorMap, 1, $aColorMap[$i][0], ($i - 1) * 2 + 1)
                DllStructSetData($tColorMap, 1, $aColorMap[$i][1], ($i - 1) * 2 + 2)
            Next
    
            $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesRemapTable", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $bEnable, "int", $iCount, "struct*", $tColorMap)
        Else
            $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesRemapTable", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $bEnable, "int", 0, "struct*", 0)
        EndIf
    
        If @error Then Return SetError(@error, @extended, False)
        If $aResult[0] Then Return SetError(10, $aResult[0], False)
    
        Return True
    EndFunc   ;==>_GDIPlus_ImageAttributesSetRemapTable
    
    ; #FUNCTION# ====================================================================================================================
    ; Author ........: UEZ
    ; Modified ......:
    ; ===============================================================================================================================
    Func _GDIPlus_ImageAttributesSetThreshold($hImageAttributes, $fThreshold, $iColorAdjustType = $GDIP_COLORADJUSTTYPE_DEFAULT, $bEnable = True)
        Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesThreshold", "handle", $hImageAttributes, "int", $iColorAdjustType, "bool", $bEnable, "float", $fThreshold)
        If @error Then Return SetError(@error, @extended, False)
        If $aResult[0] Then Return SetError(10, $aResult[0], False)
    
        Return True
    EndFunc   ;==>_GDIPlus_ImageAttributesSetThreshold
    Alles anzeigen

    Danke an Bitnugger für den Hinweis. Ich selbst nutze die nicht veröffentlichte Beta 3.3.15.1, wo diese Funktionen bereits integriert sind. :whistling:

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 1. Januar 2019 um 18:05

    Danke für's Testen. Na dann warte ich auf das 1809 Update. Wenn ich eine Lösung habe, aktualisiere ich das Skript.

  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 1. Januar 2019 um 17:41

    Hmm, ich habe noch die 1803 Version.

    Funktioniert dieses Skript:

    C
    #include <Clipboard.au3>
    #include <IE.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>
    ;Coded by UEZ 2011 - beta version
    
    If @OSBuild < 6000 Then Exit MsgBox(16, "Error!", "Script is running only on Vista+ os properly!", 10)
    
    ;https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)
    RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", @ScriptName)
    If @error Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", @ScriptName, "REG_DWORD", 11001)
    
    
    Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
    Global $sChkAero = DllStructCreate("int;")
    DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
    Global $aero = DllStructGetData($sChkAero, 1)
    DllClose($hDwmApiDll)
    If Not $aero Then Exit MsgBox(16, "Error", "Aero must be enabled to grab web sites properly!", 20)
    $sChkAero = 0
    
    Global $URL, $btn, $msg, $hWnd, $input, $i
    $hWnd = GUICreate("Save Web Page as an image", 320, 120)
    $input = GUICtrlCreateInput("https://web.de", 10, 5, 300, 20)
    $btn = GUICtrlCreateButton("Ok", 40, 35, 240, 70)
    ControlFocus($hWnd, "", $btn)
    GUISetState()
    
    While $msg <> -3
        $msg = GUIGetMsg()
        Select
            Case $msg = $btn
                Start()
            Case $msg = -3
                GUIDelete($hWnd)
                Exit
        EndSelect
    WEnd
    
    Func Start()
        $URL = GUICtrlRead($input)
        SplashTextOn("Screenshooting Web Site", "Please wait while taking screenshot", 300, 40, -1, -1, 1 + 2 + 4 + 32, "")
        AdlibRegister("Wait", 300)
        Web_Screenshot($URL)
        AdlibUnRegister("Wait")
        SplashOff()
        MsgBox(0, "Information", "Web Site Image copied to clipboard!", 10)
    EndFunc
    
    Func Web_Screenshot($url, $IEwidth = 1045)
        Local $oIE, $GUIActiveX, $oDocument,  $oBody, $BodyWidth, $BodyHeight, $oHtml
        Local $hGUI_WebGrab, $hWin, $aWin, $aMP
        Local Const $BrowserNavConstant = 2 + 256 + 2048 ;BrowserNavConstant -> http://msdn.microsoft.com/en-us/library/dd565688(v=vs.85).aspx
        $oIE = ObjCreate("Shell.Explorer.2") ;http://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx
    
        $hWin = WinGetHandle("Program Manager")
        $aWin = WinGetPos($hWin)
    
        #region render web site to get height
        $hGUI_WebGrab = GUICreate("",  0, 0, $aWin[0] - $BodyWidth + 1, $aWin[1] - $BodyHeight + 1, BitOR($WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_POPUP),Default, WinGetHandle(AutoItWinGetTitle()))
    ;~     $hGUI_WebGrab = GUICreate("",  1024, 768, 0, 0, BitOR($WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_POPUP),Default, WinGetHandle(AutoItWinGetTitle()))
        $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $IEwidth, 256)
        GUISetState(@SW_MINIMIZE, $hGUI_WebGrab)
    ;~     GUISetState(@SW_SHOW, $hGUI_WebGrab)
    
    
        Local $timeout = 30 * 1000
        Local $timer = TimerInit()
        With $oIE
            .Silent = True
            .FullScreen = True
            .Resizable = False
            .Visible = False
            .StatusBar = False
            .AddressBar = False
            .Navigate($URL, $BrowserNavConstant, "_top")
            Do
                If TimerDiff($timer) > $timeout Then ExitLoop
                Sleep(100)
            Until $oIE.ReadyState = 4
            .Stop
            Sleep(2000)
        EndWith
        $oDocument = $oIE.document
        $oBody = $oDocument.body
        $oBody.scroll = "no"
        $oBody.style.borderStyle = "none"
        $BodyWidth = Min($oBody.scrollWidth, 4096)
        $BodyHeight = Min($oBody.scrollHeight, 8192)
        GUIDelete($hGUI_WebGrab)
        $GUIActiveX = 0
        #endregion
    
        Local $IE_Ver = RegRead("HKLM\SOFTWARE\Microsoft\Internet Explorer", "Version"), $height
        If $IE_Ver > 8 Then $BodyHeight = Min($BodyHeight, 8192)
    
    ;~     ConsoleWrite($oIE.Path & @CRLF)
    
        $hGUI_WebGrab = GUICreate("",  $BodyWidth,  $BodyHeight, $aWin[0] - $BodyWidth + 10, $aWin[1] - $BodyHeight + 10, BitOR($WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_POPUP), Default, WinGetHandle(AutoItWinGetTitle()))
    ;~     $hGUI_WebGrab = GUICreate("",  $BodyWidth,  $BodyHeight, -1, -1, BitOR($WS_CLIPSIBLINGS, $WS_CLIPCHILDREN, $WS_POPUP), Default, WinGetHandle(AutoItWinGetTitle()))
        $GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, $BodyWidth,  $BodyHeight)
        GUISetState(@SW_SHOW, $hGUI_WebGrab) ;Show GUI for some milli seconds to make a screenshot
    
        $timer = TimerInit()
        With $oIE
            .Silent = True
            .FullScreen = True
            .Resizable = False
            .Visible = False
            .StatusBar = False
            .AddressBar = False
            .Navigate($URL, $BrowserNavConstant, "_top")
            Do
                If TimerDiff($timer) > $timeout Then ExitLoop
                Sleep(100)
            Until $oIE.ReadyState = 4
            .Stop
            Sleep(1000)
        EndWith
    
        $oDocument = $oIE.document
        $oBody =$oDocument.body
        $oHtml = $oDocument.documentElement
        $oBody.scroll = "no"
        $oBody.style.borderStyle = "none"
        $oBody.style.border = "0px"
        $oHtml.style.overflow = 'hidden'
        Sleep(5000)
        GUISetState(@SW_SHOW, $hGUI_WebGrab)      ;Show GUI
    
        Local $hDC = _WinAPI_GetWindowDC($hGUI_WebGrab)
        Local $hDC_Dummy = _WinAPI_GetWindowDC(0)
        Local $hMemDC = _WinAPI_CreateCompatibleDC($hDC_Dummy)
        Local $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC_Dummy, $BodyWidth, $BodyHeight)
        _WinAPI_SelectObject($hMemDC, $hBitmap)
        _WinAPI_BitBlt($hMemDC, 0, 0,  $BodyWidth, $BodyHeight, $hDC, 0, 0, $SRCCOPY)
    
        _WinAPI_DeleteDC($hMemDC)
        _WinAPI_ReleaseDC($hGUI_WebGrab, $hDC)
        _WinAPI_ReleaseDC(0, $hDC_Dummy)
        _WinAPI_ReleaseDC(0, $hDC)
    
        _ClipBoard_Open(0)
        _ClipBoard_Empty()
        _ClipBoard_SetDataEx($hBitmap, $CF_BITMAP)
        _ClipBoard_Close()
        _WinAPI_DeleteObject ($hBitmap)
    
        $GUIActiveX = 0
        $oIE = 0
        GUIDelete($hGUI_WebGrab)
        _ReduceMemory()
    EndFunc
    
    Func Min($a, $b)
        If $a < $b Then Return $a
        Return $b
    EndFunc
    
    Func Wait()
        Switch Mod($i, 4)
            Case 0
                ControlSetText("Screenshooting Web Site", "", "Static1", "Please wait while taking screenshot")
            Case 1
                ControlSetText("Screenshooting Web Site", "", "Static1", "Please wait while taking screenshot .")
            Case 2
                ControlSetText("Screenshooting Web Site", "", "Static1", "Please wait while taking screenshot ..")
            Case 3
                ControlSetText("Screenshooting Web Site", "", "Static1", "Please wait while taking screenshot ...")
        EndSwitch
        $i += 1
    EndFunc
    
    Func _ReduceMemory($ProcID = 0)
        If $ProcID = 0 or ProcessExists($ProcID) = 0 Then ; No process id specified or process doesn't exist - use current process instead.
            Local $ai_GetCurrentProcess = DllCall('kernel32.dll', 'ptr', 'GetCurrentProcess')
            Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'ptr', $ai_GetCurrentProcess[0])
            Return $ai_Return[0]
        EndIf
        Local $ai_Handle = DllCall("kernel32.dll", 'ptr', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $ProcID)
        Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'ptr', $ai_Handle[0])
        DllCall('kernel32.dll', 'int', 'CloseHandle', 'ptr', $ai_Handle[0])
        Return $ai_Return[0]
    EndFunc
    Alles anzeigen
  • AutoIt Windows Screenshooter v1.87 Build 2026-09-01

    • UEZ
    • 1. Januar 2019 um 17:26

    Ein schönes neues Jahr allen!

    Danke Tweaky für dein Feedback. Welches OS benutzt du bzw. welche IE Version ist installiert?

    Eigentlich habe ich am Webseiten Screenshot nichts wesentliches geändert, aber es scheint, dass ein KB Update das Automatisieren erschwert hat, denn ich muss erst einen Registry Eintrag setzen, damit das Resultat "ordentlich" aussieht.

    So sieht's bei mir aus, wenn ich autoit.de als Quelle benutze:

    [Blockierte Grafik: https://i.ibb.co/54Jd4gm/Windows-Screenshooter-Test.jpg]

  • Forenupdate - November 2018 - Probleme / Anregungen / Feedback - Sammelthread

    • UEZ
    • 18. November 2018 um 00:32

    Forum inkl. Dateianhänge sind nur noch erreichbar, wenn man eingeloggt ist.

    Ist blöd so...

  • GDIPlus Klick auf Objekt

    • UEZ
    • 17. November 2018 um 15:33

    Ich würde in diesem Fall mit Pfaden arbeiten (_GDIPlus_Path*). Du könntest dann einfach mit _GDIPlus_PathIsVisiblePoint() prüfen, ob die Maus den Pfad berührt.

    Schaue dazu einfach mal in der Hilfe Datei nach.

  • NTFS ACL Berechtigungen Anzeigen/Setzen

    • UEZ
    • 24. Oktober 2018 um 14:37

    Ich denke nicht, dass es mit nativen AutoIt Befehlen geht. Alternativ kannst du auch das CMD Tool CACLS.exe / ICACLS.exe benutzen.

  • The MATRIX build 2018-10-16

    • UEZ
    • 18. Oktober 2018 um 11:10

    Lottich : ich vermute, dass Aufgrund der Zufallskoordinaten die Wahrscheinlichkeit sehr klein ist, dass du ein gleiches Bild entdeckst. Wenn die GIF Animation relativ lange ist, dann sollte der kleine Wechsel zum Anfang nicht sonderlich stören.

    Oder du nimmst die Variante und generierst den Hintergrund in Echtzeit, wie im anderen Beispiel.

  • The MATRIX build 2018-10-16

    • UEZ
    • 16. Oktober 2018 um 17:16
    Zitat von Andy

    60FPS im Fullscreen, damit kann (muss) man leben! :o)

    Fullscreen ist zwar richtig, aber es wird nur auf halbe Größe gezeichnet und dann auf Fullscreen skaliert. Da "türke" ich etwas... :P

    Du kannst ja mal richtig auf Fullscreen die $iW / $iH setzen und checken, ob du noch deine 60 FPS bekommst. Meine alte Kiste schafft nur etwa die Hälfte...

    Btw, ich habe das Skript nochmals aktualisiert. Ich hatte vergessen, dass GDI Bitmaps, die mit CreateDIBSection erstellt wurden, schneller sind. Außerdem kann man jetzt nach dem Starten aussuchen, ob man Fullscreen starten möchte oder nicht.

    Ich glaube, dass reicht erst mal mit dem Matrix Skript. Ich habe noch eine weiter Idee, die ich versuchen werde in FB umzusetzen, da viel schneller, wenn ich die Farben manipulieren will.

  • The MATRIX build 2018-10-16

    • UEZ
    • 15. Oktober 2018 um 22:05

    Hi Lottich,

    man könnte es auch direkt in eine GUI darstellen, ohne eine Child GUI zu verwenden, aber beides ist möglich.

    Schaue mal hier: https://www.autoitscript.com/forum/topic/19…comment=1403561

    Anstelle der GIF Animation könnte man auch "The MATRIX" als Hintergrund darstellen. Probiere mal das zu basteln. :)

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™