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

  • Assembler CookBook (ASM Tutorial) + LASM + LASM Inline AutoIt

    • UEZ
    • 15. Januar 2015 um 11:03

    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    Gruß,
    UEZ

  • Animiertes GIF in einzelne Frames splitten?

    • UEZ
    • 12. Januar 2015 um 16:42

    Hast es mit der neusten Beta probiert? Eigentlich sollte es ab der Version 3.3.12.0 funzen.

    Gruß,
    UEZ

  • Animiertes GIF in einzelne Frames splitten?

    • UEZ
    • 12. Januar 2015 um 13:23

    Du kannst die _GDIPlus_GIFAnim.au3 von hier benutzen.

    Beispiel zum Extrahieren:

    [autoit]


    #AutoIt3Wrapper_Version=b
    #include <Array.au3>
    #include "_GDIPlus_GIFAnim.au3"

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

    _GDIPlus_Startup()
    Global $binGif = Binary(FileRead("BoingRed v2.1.gif"))
    Global $hGIFImage = _GDIPlus_BitmapCreateFromMemory($binGif)

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

    Global Const $iAnimDimCount = _GDIPlus_GIFAnimGetFrameDimensionsCount($hGIFImage), _
    $tGUID = _GDIPlus_GIFAnimGetFrameDimensionsList($hGIFImage, $iAnimDimCount), _
    $iAnimFrameCount = _GDIPlus_GIFAnimGetFrameCount($hGIFImage, $tGUID), _
    $aFrameDelays = _GDIPlus_GIFAnimGetFrameDelaysFromBinFile($binGif, $iAnimFrameCount)

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

    ConsoleWrite("Extracting " & Int($iAnimFrameCount) + 1 & " frames to disk and resizing each frame to 32x32 pixels..." & @CRLF)

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

    _GDIPlus_GIFAnimExtractAllFrames($hGIFImage, @ScriptDir & "\BoingRed v2.1_frames\BoingRed.gif", 85, 32, 32, 2, 1)
    ;~ FileWrite("c:\Temp\GIFAnim.delay.txt", _ArrayToString($aFrameDelays))

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

    _GDIPlus_BitmapDispose($hGIFImage)
    _GDIPlus_Shutdown()
    ConsoleWrite("Done." & @CRLF)

    [/autoit]

    Gruß,
    UEZ

  • Zeichenkette Formatiert zusammen ausgeben

    • UEZ
    • 9. Januar 2015 um 23:19
    [autoit]

    $s1 = "foo"
    $s2 = ""

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

    MsgBox(0, "Test", StringLen($s1) ? StringLen($s2) ? $s1 & " -- " & $s2 : $s1 : $s2)

    [/autoit]

    Gruß,
    UEZ

  • String umformen

    • UEZ
    • 9. Januar 2015 um 22:57

    Versuches es mal damit:

    [autoit]

    StringRegExpReplace($s_xmlline, "(?im).*>(.+)<\/.*", "$1")

    [/autoit]

    Gruß,
    UEZ

  • Geschwindigkeitsoptimierung in AutoIt

    • UEZ
    • 21. Dezember 2014 um 13:28

    Ich vermute eher, dass es die CPU ist, die bestimmte Befehle in den schnellen Cache legt, um wiederkehrende Prozessor Code schneller ablaufen zu lassen.

    Ich könnte ja dir meine komplilierte Exe geben und die sollte sich theoretisch nicht von deiner Version in Bezug auf Geschwindigkeit unterscheiden.


    Resultat von Post#13

    Code
    >Result with AutoIt 3.3.13.19 x64.
    >CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz X64
    >RAM: 4.28/7.43 GB
    >OS: WIN_81 (9600) X64
    >Parameter: 100
    +Func For (1)    needs for 4095 runs 519.66 ms (Average: 0.1269 ms)    --> 1.0x
    !Func While (2)    needs for 4095 runs 685.15 ms (Average: 0.1673 ms)    --> 1.3x
    -Func Do (3)    needs for 4095 runs 671.51 ms (Average: 0.1640 ms)    --> 1.3x

    Gruß,
    UEZ

  • Geschwindigkeitsoptimierung in AutoIt

    • UEZ
    • 20. Dezember 2014 um 13:12

    Ich habe mir die 1 Test Funktion mal näher angeschaut und es sieht so aus, als ob der Prozessor die "leere" For/Next Schleife anders ausführt als die anderen 2 Funktionen, die in der Schleife die Variable hochzählen.

    Ergo:

    [autoit]


    Func _TestFunc_1($vParam = False);funktion 1
    Local $j = 0
    For $i = 1 To $vParam
    $j += 1
    Next
    EndFunc ;==>_TestFunc_1

    [/autoit]

    Das Resultat sieht dann bei mir anders aus!

    Code
    >Result with AutoIt 3.3.12.0 x64.
    >CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz X64
    >RAM: 4.25/7.43 GB
    >OS: WIN_81 (9600) X64
    >Parameter: 1000
    +Func For (1)    needs for 4095 runs 710.43 ms (Average: 0.1735 ms)    --> 1.0x
    -Func While (2)    needs for 4095 runs 1997.82 ms (Average: 0.4879 ms)    --> 2.8x
    !Func Do (3)    needs for 4095 runs 2062.90 ms (Average: 0.5038 ms)    --> 2.9x

    Das würde bedeuten, dass mein Prozessor die nichts tuende Schleife einfach ignoriert und deshalb es zu dem Faktor 12 kommt.

    Gruß,
    UEZ

  • Geschwindigkeitsoptimierung in AutoIt

    • UEZ
    • 19. Dezember 2014 um 19:41

    Hier meine Werte:

    Code
    >Result with AutoIt 3.3.12.0 x86.
    >CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz X64
    >RAM: 4.31/7.43 GB
    >OS: WIN_81 (9600) X64
    >Parameter: 1000
    +Func For (1)    needs for 4095 runs 258.87 ms (Average: 0.0632 ms)    --> 1.0x
    -Func While (2)    needs for 4095 runs 2755.07 ms (Average: 0.6728 ms)    --> 10.6x
    !Func Do (3)    needs for 4095 runs 2764.77 ms (Average: 0.6752 ms)    --> 10.7x
    
    
    
    
    >Result with AutoIt 3.3.13.19 x86.
    >CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz X64
    >RAM: 4.24/7.43 GB
    >OS: WIN_81 (9600) X64
    >Parameter: 1000
    +Func For (1)    needs for 4095 runs 184.77 ms (Average: 0.0451 ms)    --> 1.0x
    -Func While (2)    needs for 4095 runs 2145.54 ms (Average: 0.5239 ms)    --> 11.6x
    !Func Do (3)    needs for 4095 runs 2198.83 ms (Average: 0.5370 ms)    --> 11.9x
    
    
    >Result with AutoIt 3.3.12.0 x64.
    >CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz X64
    >RAM: 4.24/7.43 GB
    >OS: WIN_81 (9600) X64
    >Parameter: 1000
    +Func For (1)    needs for 4095 runs 159.08 ms (Average: 0.0388 ms)    --> 1.0x
    -Func While (2)    needs for 4095 runs 1883.34 ms (Average: 0.4599 ms)    --> 11.8x
    !Func Do (3)    needs for 4095 runs 1928.14 ms (Average: 0.4709 ms)    --> 12.1x
    
    
    
    
    >Result with AutoIt 3.3.13.19 x64.
    >CPU: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz X64
    >RAM: 4.24/7.43 GB
    >OS: WIN_81 (9600) X64
    >Parameter: 1000
    +Func For (1)    needs for 4095 runs 153.76 ms (Average: 0.0375 ms)    --> 1.0x
    -Func While (2)    needs for 4095 runs 1867.55 ms (Average: 0.4561 ms)    --> 12.1x
    !Func Do (3)    needs for 4095 runs 1874.19 ms (Average: 0.4577 ms)    --> 12.2x
    Alles anzeigen

    Die Beta x64 scheint die schnellste Version zu sein.

    Gruß,
    UEZ

  • Autohexagon - ein kleines Spiel

    • UEZ
    • 7. Dezember 2014 um 20:33

    Auf meinem Win 8.1 Notebook läuft's auch nicht.

    Fehler: "Error ARB Extension".

    Kompatibilitätsmodis: WinXP, Win7 funzt es auch nicht.

    Gruß,
    UEZ

  • die neuen GDIplus Funktionen funzen nicht unter XP

    • UEZ
    • 4. Dezember 2014 um 14:01

    Na ja, wenn man die GDIPlus.dll patchen muss, ist dies doch ein Eingriff, der bestimmt nicht erlaubt ist, zumal man sich eine DLL von einer anderen Windows Version holen muss, die man nicht lizensiert hat, wenn man nur WinXP betreibt.

    Ich habe nicht die EULA gelesen, so dass ich nur vermuten kann...

    Gruß,
    UEZ

  • die neuen GDIplus Funktionen funzen nicht unter XP

    • UEZ
    • 4. Dezember 2014 um 08:46

    GDIPlus v1.1 ist nur ab Vista / Server 2008 oder höher verfügbar. Allerdings kann man GDI+ v1.1 auch unter WinXP benutzen, aber kann sein, dass dies gegen die MS EULA verstößt.

    WinXP ist nach meiner Meinung, bei allem Respekt für die WinXP Zieten, alter Tobak und sollte durch ein moderneres BS abgelöst werden.

    Gruß,
    UEZ

  • Multiplikation von mathematischen Variablen -> 2x*3x = 6x^2

    • UEZ
    • 2. Dezember 2014 um 18:26

    Wenn du es bei diesem "simplen" Beispiel belässt, dann ist das einfach, aber willst du eine Mathe Parser schreiben, dann wird's richtig kompliziert.

    Gruß,
    UEZ

  • Tutorial – OOP in AutoIt

    • UEZ
    • 29. November 2014 um 20:16

    Finde ich sehr gut gelungen. :thumbup:

    Hast du auch ein herunterladbare Version?

    Gruß,
    UEZ

  • Powershell Command aus AUTOIT ausführen

    • UEZ
    • 25. November 2014 um 23:18

    Vielleicht hilft dieser Thread: http://www.autoitscript.com/forum/topic/147273-powershell-com
    Allerdings sind AD Aufgaben mit der UDF von water besser bedient, als mit PS indirekt zu arbeiten.


    Br,
    UEZ

  • Alles Gute, UEZ

    • UEZ
    • 25. November 2014 um 21:46

    Dann prost auf die nächsten Jahre hier im Forum. :party:

    Vielen Dank und Grüße,
    UEZ

  • wie kann man ein GIF incl. Transparenz speichern (z.B. _ScreenCapture_Capture)

    • UEZ
    • 25. November 2014 um 11:44

    Du kannst so was hier benutzen:

    Spoiler anzeigen
    [autoit]


    ;benötigt 3.3.12.0
    #include <ScreenCapture.au3>

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

    _GDIPlus_Startup()
    Global $iWidth = 400, $iHeight = 400
    Global $hBitmap_GDI = _ScreenCapture_Capture("", 0, 0, $iWidth - 1, $iHeight - 1, 0)
    Global $hBitmap_GDIPlus = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap_GDI)
    Global $hBitmap_Result = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight)
    Global $hBitmap_Result_Ctxt = _GDIPlus_ImageGetGraphicsContext($hBitmap_Result)

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

    Global $aRemapTable[2][2]
    $aRemapTable[0][0] = 1
    $aRemapTable[1][0] = 0xFFFFFFFF ;Farbe, die Transparent gemacht werden soll
    $aRemapTable[1][1] = 0x08000000 ;Semi Transparenz - Format 0xAARRGGBB

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

    Global $hIA = _GDIPlus_ImageAttributesCreate()
    _GDIPlus_ImageAttributesSetRemapTable($hIA, 1, True, $aRemapTable)
    _GDIPlus_GraphicsDrawImageRectRect($hBitmap_Result_Ctxt, $hBitmap_GDIPlus, 0, 0, $iWidth, $iHeight, 0, 0, $iWidth, $iHeight, $hIA)
    _GDIPlus_ImageSaveToFile($hBitmap_Result, @ScriptDir & "\Result.png")

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

    _GDIPlus_GraphicsDispose($hBitmap_Result_Ctxt)
    _GDIPlus_BitmapDispose($hBitmap_GDIPlus)
    _GDIPlus_BitmapDispose($hBitmap_Result)
    _WinAPI_DeleteObject($hBitmap_GDI)
    _GDIPlus_ImageAttributesDispose($hIA)
    _GDIPlus_Shutdown()

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

    ShellExecute(@ScriptDir & "\Result.png")

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

    Func _GDIPlus_ImageAttributesSetRemapTable($hImageAttributes, $iColorAdjustType = 0, $fEnable = False, $aColorMap = 0)
    Local $iI, $iCount, $tColorMap, $aResult
    If IsArray($aColorMap) And UBound($aColorMap) > 1 Then
    $iCount = $aColorMap[0][0]
    $tColorMap = DllStructCreate("uint ColorMap[" & $iCount * 2 & "]")
    For $iI = 1 To $iCount
    $tColorMap.ColorMap((2 * $iI - 1)) = $aColorMap[$iI][0]
    $tColorMap.ColorMap((2 * $iI)) = $aColorMap[$iI][1]
    Next
    $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesRemapTable", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $fEnable, "int", $iCount, "struct*", $tColorMap)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndIf
    Return SetError(11, 0, False)
    EndFunc ;==>_GDIPlus_ImageAttributesSetRemapTable

    [/autoit]

    Die weiße Fläche sollte komplett Transparent sein.

    Gruß,
    UEZ

  • wie kann man ein GIF incl. Transparenz speichern (z.B. _ScreenCapture_Capture)

    • UEZ
    • 25. November 2014 um 11:12

    Warum willst du im GIF Format speichern? Wäre PNG nicht die bessere Wahl?

    Du kannst zwar mit GDI+ im GIF Format speichern, aber, soweit ich mich erinnere, wird das Bild "gedithered", was nicht umbedingt schön aussieht.

    Gruß,
    UEZ

  • Animation mit GDI+ und Bildern

    • UEZ
    • 24. November 2014 um 21:39

    Die Funktion

    [autoit]


    Func Scale_Image($hImage, $newW, $newH)
    Local $newImage = _GDIPlus_BitmapCreateFromScan0($newW, $newH)
    Local $hContext = _GDIPlus_ImageGetGraphicsContext($newImage)
    _GDIPlus_GraphicsSetInterpolationMode($hContext, 7)
    _GDIPlus_GraphicsDrawImageRect($hContext, $hImage, 0, 0, $newW, $newH)
    _GDIPlus_GraphicsDispose($hContext)
    Return SetError(0, 0, $newImage)
    EndFunc ;==>Scale_Image

    [/autoit]

    gibt einen Grafik Handle zurück, sodass dieser nach Benutzung wieder freigegeben werden muss. D.h. _GDIPlus_GraphicsDrawImage($hImage, Scale_Image(), ...) ist keine gute Idee, da bei jedem Aufruf das Bild zwar skaliert wird, aber die Ressourcen nicht wieder freigegeben werden.

    Am besten sowas machen:

    [autoit]


    For $t = 0 To $picwith
    $hBmp_Scaled = Scale_Image($pichandle, $t, $pichigh)
    _GDIPlus_GraphicsDrawImage($hImage, $hBmp_Scaled, $posx + ($picwith / 2) - ($t / 2), $posy)
    _GDIPlus_BitmapDispose($hBmp_Scaled)
    Next

    [/autoit]

    Gruß,
    UEZ

  • Animation mit GDI+ und Bildern

    • UEZ
    • 24. November 2014 um 20:56

    Na ja,

    [autoit]


    For $t = 0 To UBound($pics) - 1
    $pichandles[$t] = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\" & $pics[$t])
    $used[$t] = False
    $picnamen[$t] = $pics[$t]
    Next

    [/autoit]


    lädt doch alle Bilder in den Speicher. Das frisst deinen Speicher auf, wenn du viele Bilder hast.

    Du solltest, bevor du das Bild anzeigen willst, erst dann laden und anschließend wieder das Handle freigeben (Dispose).

    Gruß,
    UEZ

  • Animation mit GDI+ und Bildern

    • UEZ
    • 24. November 2014 um 20:31

    Lade die Bilder nicht alle auf einmal in den Speicher, sondern speicher nur die Pfade zu den Bildern und lade die Bilder anschließend "on-the-fly".

    Gruß,
    UEZ

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™