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

  • AutoIt Versions-Archiv und Diskussionsthread (3.3.8.1 bis 3.3.10.2, Stand 30.12.13)

    • UEZ
    • 26. Dezember 2013 um 12:58

    Einen Rollback wird es nicht geben, sondern 3.3.10.1, welches in den nächsten Tagen veröffentlicht wird.

    Ich hätte eher die Version 3.4.0.0 gewählt, da in dieser Version doch ziemlich viel verändert wurde und man seine Skripte i.d.R. anpassen muss, damit sie laufen.

    Falls sie nicht laufen sollten, sollte man dies melden, so dass man die Probleme beheben kann (Beta Phase), ansonsten kommt das raus, was gerade heraus gekommen ist.

    Gruß,
    UEZ

  • AutoIt Versions-Archiv und Diskussionsthread (3.3.8.1 bis 3.3.10.2, Stand 30.12.13)

    • UEZ
    • 25. Dezember 2013 um 18:53

    Hmm, bei mir funzt es normal! Ok, für BMP Dateien funzt es nicht!

    Gebe ich weiter!

    Gruß,
    UEZ

  • GDI+ How to Path

    • UEZ
    • 25. Dezember 2013 um 02:05

    Ein schönes Weihnachtsgeschenk an alle GDI+ Liebhaber! :love:


    Vielen Dank und schöne Weihnachten!

    Gruß,
    UEZ :thumbup:

  • "Duplizieren" Modus

    • UEZ
    • 21. Dezember 2013 um 00:41

    Das kann man bestimmt irgendwo in der Registry steuern. Frage doch mal Google...

    Gruß,
    UEZ

  • Eigener GDIPlus Button Style

    • UEZ
    • 20. Dezember 2013 um 23:11

    Ich habe doch keine Version gepostet! ?(

    Egal, hier die konvertierte Version mittels Wrapper und habe die Ternary Anweisung durch If/Then ersetzt:

    Spoiler anzeigen
    [autoit]


    Global Const $GDIP_PXF32ARGB = 0x0026200A
    Global Const $GDIP_SMOOTHINGMODE_DEFAULT = 0
    Global Const $GDIP_SMOOTHINGMODE_ANTIALIAS8X8 = 5
    Global Const $tagRECT = "struct;long Left;long Top;long Right;long Bottom;endstruct"
    Global Const $tagGDIPRECTF = "struct;float X;float Y;float Width;float Height;endstruct"
    Global Const $tagGDIPSTARTUPINPUT = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
    Global $tagREBARBANDINFO = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader"
    If (@OSVersion <> "WIN_XP") Then $tagREBARBANDINFO &= ";" & $tagRECT & ";uint uChevronState"
    Global Const $HGDI_ERROR = Ptr(-1)
    Global Const $INVALID_HANDLE_VALUE = Ptr(-1)
    Global Const $KF_EXTENDED = 0x0100
    Global Const $KF_ALTDOWN = 0x2000
    Global Const $KF_UP = 0x8000
    Global Const $LLKHF_EXTENDED = BitShift($KF_EXTENDED, 8)
    Global Const $LLKHF_ALTDOWN = BitShift($KF_ALTDOWN, 8)
    Global Const $LLKHF_UP = BitShift($KF_UP, 8)
    Global Const $tagOSVERSIONINFO = 'struct;dword OSVersionInfoSize;dword MajorVersion;dword MinorVersion;dword BuildNumber;dword PlatformId;wchar CSDVersion[128];endstruct'
    Global Const $__WINVER = __WINVER()
    Func __WINVER()
    Local $tOSVI = DllStructCreate($tagOSVERSIONINFO)
    DllStructSetData($tOSVI, 1, DllStructGetSize($tOSVI))
    Local $Ret = DllCall('kernel32.dll', 'bool', 'GetVersionExW', 'struct*', $tOSVI)
    If @error Or Not $Ret[0] Then Return SetError(@error, @extended, 0)
    Return BitOR(BitShift(DllStructGetData($tOSVI, 2), -8), DllStructGetData($tOSVI, 3))
    EndFunc ;==>__WINVER
    Global $ghGDIPBrush = 0
    Global $ghGDIPDll = 0
    Global $ghGDIPPen = 0
    Global $giGDIPRef = 0
    Global $giGDIPToken = 0
    Global $gbGDIP_V1_0 = True
    Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iPixelFormat = $GDIP_PXF32ARGB, $iStride = 0, $pScan0 = 0)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[6]
    EndFunc ;==>_GDIPlus_BitmapCreateFromScan0
    Func _GDIPlus_BitmapDispose($hBitmap)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDisposeImage", "handle", $hBitmap)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_BitmapDispose
    Func _GDIPlus_BrushCreateSolid($iARGB = 0xFF000000)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateSolidFill", "int", $iARGB, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[2]
    EndFunc ;==>_GDIPlus_BrushCreateSolid
    Func _GDIPlus_BrushDispose($hBrush)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeleteBrush", "handle", $hBrush)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_BrushDispose
    Func _GDIPlus_FontFamilyCreate($sFamily, $pCollection = 0)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateFontFamilyFromName", "wstr", $sFamily, "ptr", $pCollection, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[3]
    EndFunc ;==>_GDIPlus_FontFamilyCreate
    Func _GDIPlus_FontFamilyDispose($hFamily)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeleteFontFamily", "handle", $hFamily)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_FontFamilyDispose
    Func _GDIPlus_GraphicsClear($hGraphics, $iARGB = 0xFF000000)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipGraphicsClear", "handle", $hGraphics, "dword", $iARGB)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_GraphicsClear
    Func _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateFromHWND", "hwnd", $hWnd, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[2]
    EndFunc ;==>_GDIPlus_GraphicsCreateFromHWND
    Func _GDIPlus_GraphicsDispose($hGraphics)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeleteGraphics", "handle", $hGraphics)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_GraphicsDispose
    Func _GDIPlus_GraphicsDrawImage($hGraphics, $hImage, $nX, $nY)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawImage", "handle", $hGraphics, "handle", $hImage, "float", $nX, "float", $nY)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_GraphicsDrawImage
    Func _GDIPlus_GraphicsDrawPath($hGraphics, $hPath, $hPen = 0)
    __GDIPlus_PenDefCreate($hPen)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDrawPath", "handle", $hGraphics, "handle", $hPen, "handle", $hPath)
    __GDIPlus_PenDefDispose()
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_GraphicsDrawPath
    Func _GDIPlus_GraphicsFillPath($hGraphics, $hPath, $hBrush = 0)
    __GDIPlus_BrushDefCreate($hBrush)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipFillPath", "handle", $hGraphics, "handle", $hBrush, "handle", $hPath)
    __GDIPlus_BrushDefDispose()
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_GraphicsFillPath
    Func _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $iSmooth)
    If $iSmooth < $GDIP_SMOOTHINGMODE_DEFAULT Or $iSmooth > $GDIP_SMOOTHINGMODE_ANTIALIAS8X8 Then $iSmooth = $GDIP_SMOOTHINGMODE_DEFAULT
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetSmoothingMode", "handle", $hGraphics, "int", $iSmooth)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_GraphicsSetSmoothingMode
    Func _GDIPlus_ImageGetGraphicsContext($hImage)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipGetImageGraphicsContext", "handle", $hImage, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[2]
    EndFunc ;==>_GDIPlus_ImageGetGraphicsContext
    Func _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2, $iWrapMode = 0)
    Local $tPointF1, $tPointF2, $aResult
    $tPointF1 = DllStructCreate("float;float")
    $tPointF2 = DllStructCreate("float;float")
    DllStructSetData($tPointF1, 1, $nX1)
    DllStructSetData($tPointF1, 2, $nY1)
    DllStructSetData($tPointF2, 1, $nX2)
    DllStructSetData($tPointF2, 2, $nY2)
    $aResult = DllCall($ghGDIPDll, "int", "GdipCreateLineBrush", "struct*", $tPointF1, "struct*", $tPointF2, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iWrapMode, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[6]
    EndFunc ;==>_GDIPlus_LineBrushCreate
    Func _GDIPlus_MatrixCreate()
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateMatrix", "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[1]
    EndFunc ;==>_GDIPlus_MatrixCreate
    Func _GDIPlus_MatrixDispose($hMatrix)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeleteMatrix", "handle", $hMatrix)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_MatrixDispose
    Func _GDIPlus_MatrixSetElements($hMatrix, $nM11 = 1, $nM12 = 0, $nM21 = 0, $nM22 = 1, $nDX = 0, $nDY = 0)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetMatrixElements", "handle", $hMatrix, "float", $nM11, "float", $nM12, "float", $nM21, "float", $nM22, "float", $nDX, "float", $nDY)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_MatrixSetElements
    Func _GDIPlus_MatrixTranslate($hMatrix, $fOffsetX, $fOffsetY, $bAppend = False)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipTranslateMatrix", "handle", $hMatrix, "float", $fOffsetX, "float", $fOffsetY, "int", $bAppend)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_MatrixTranslate
    Func _GDIPlus_PathAddArc($hPath, $nX, $nY, $nWidth, $nHeight, $fStartAngle, $fSweepAngle)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipAddPathArc", "handle", $hPath, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "float", $fStartAngle, "float", $fSweepAngle)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathAddArc
    Func _GDIPlus_PathAddString($hPath, $sString, $tLayout, $hFamily, $iStyle = 0, $fSize = 8.5, $hFormat = 0)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipAddPathString", "handle", $hPath, "wstr", $sString, "int", -1, "handle", $hFamily, "int", $iStyle, "float", $fSize, "struct*", $tLayout, "handle", $hFormat)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathAddString
    Func _GDIPlus_PathBrushCreateFromPath($hPath)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreatePathGradientFromPath", "handle", $hPath, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[2]
    EndFunc ;==>_GDIPlus_PathBrushCreateFromPath
    Func _GDIPlus_PathBrushSetCenterColor($hPathGradientBrush, $iARGB)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetPathGradientCenterColor", "handle", $hPathGradientBrush, "uint", $iARGB)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathBrushSetCenterColor
    Func _GDIPlus_PathBrushSetCenterPoint($hPathGradientBrush, $nX, $nY)
    Local $tPointF = DllStructCreate("float;float")
    DllStructSetData($tPointF, 1, $nX)
    DllStructSetData($tPointF, 2, $nY)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetPathGradientCenterPoint", "handle", $hPathGradientBrush, "struct*", $tPointF)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathBrushSetCenterPoint
    Func _GDIPlus_PathBrushSetFocusScales($hPathGradientBrush, $fScaleX, $fScaleY)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetPathGradientFocusScales", "handle", $hPathGradientBrush, "float", $fScaleX, "float", $fScaleY)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathBrushSetFocusScales
    Func _GDIPlus_PathBrushSetSigmaBlend($hPathGradientBrush, $fFocus, $fScale = 1)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetPathGradientSigmaBlend", "handle", $hPathGradientBrush, "float", $fFocus, "float", $fScale)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathBrushSetSigmaBlend
    Func _GDIPlus_PathBrushSetSurroundColor($hPathGradientBrush, $iARGB)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetPathGradientSurroundColorsWithCount", "handle", $hPathGradientBrush, "uint*", $iARGB, "int*", 1)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathBrushSetSurroundColor
    Func _GDIPlus_PathCreate($iFillMode = 0)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreatePath", "int", $iFillMode, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[2]
    EndFunc ;==>_GDIPlus_PathCreate
    Func _GDIPlus_PathDispose($hPath)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeletePath", "handle", $hPath)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathDispose
    Func _GDIPlus_PathGetWorldBounds($hPath, $hMatrix = 0, $hPen = 0)
    Local $tRectF = DllStructCreate($tagGDIPRECTF)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipGetPathWorldBounds", "handle", $hPath, "struct*", $tRectF, "handle", $hMatrix, "handle", $hPen)
    If @error Then Return SetError(@error, @extended, -1)
    If $aResult[0] Then Return SetError(10, $aResult[0], -1)
    Local $aRectF[4]
    For $iI = 1 To 4
    $aRectF[$iI - 1] = DllStructGetData($tRectF, $iI)
    Next
    Return $aRectF
    EndFunc ;==>_GDIPlus_PathGetWorldBounds
    Func _GDIPlus_PathReset($hPath)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipResetPath", "handle", $hPath)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathReset
    Func _GDIPlus_PathTransform($hPath, $hMatrix)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipTransformPath", "handle", $hPath, "handle", $hMatrix)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PathTransform
    Func _GDIPlus_PenCreate($iARGB = 0xFF000000, $fWidth = 1, $iUnit = 2)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreatePen1", "dword", $iARGB, "float", $fWidth, "int", $iUnit, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[4]
    EndFunc ;==>_GDIPlus_PenCreate
    Func _GDIPlus_PenCreate2($hBrush, $fWidth = 1, $iUnit = 2)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreatePen2", "handle", $hBrush, "float", $fWidth, "int", $iUnit, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[4]
    EndFunc ;==>_GDIPlus_PenCreate2
    Func _GDIPlus_PenDispose($hPen)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeletePen", "handle", $hPen)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_PenDispose
    Func _GDIPlus_RectFCreate($nX = 0, $nY = 0, $nWidth = 0, $nHeight = 0)
    Local $tRectF = DllStructCreate($tagGDIPRECTF)
    DllStructSetData($tRectF, "X", $nX)
    DllStructSetData($tRectF, "Y", $nY)
    DllStructSetData($tRectF, "Width", $nWidth)
    DllStructSetData($tRectF, "Height", $nHeight)
    Return $tRectF
    EndFunc ;==>_GDIPlus_RectFCreate
    Func _GDIPlus_Shutdown()
    If $ghGDIPDll = 0 Then Return SetError(-1, -1, False)
    $giGDIPRef -= 1
    If $giGDIPRef = 0 Then
    DllCall($ghGDIPDll, "none", "GdiplusShutdown", "ulong_ptr", $giGDIPToken)
    DllClose($ghGDIPDll)
    $ghGDIPDll = 0
    EndIf
    Return True
    EndFunc ;==>_GDIPlus_Shutdown
    Func _GDIPlus_Startup($sGDIPDLL = Default)
    $giGDIPRef += 1
    If $giGDIPRef > 1 Then Return True
    If $sGDIPDLL = Default Then
    If @OSBuild > 4999 And @OSBuild < 7600 Then
    $sGDIPDLL = @WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll"
    Else
    $sGDIPDLL = "gdiplus.dll"
    EndIf
    EndIf
    $ghGDIPDll = DllOpen($sGDIPDLL)
    If $ghGDIPDll = -1 Then
    $giGDIPRef = 0
    Return SetError(1, 2, False)
    EndIf
    Local $sVer = FileGetVersion($sGDIPDLL)
    $sVer = StringSplit($sVer, ".")
    If $sVer[1] > 5 Then $gbGDIP_V1_0 = False
    Local $tInput = DllStructCreate($tagGDIPSTARTUPINPUT)
    Local $tToken = DllStructCreate("ulong_ptr Data")
    DllStructSetData($tInput, "Version", 1)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdiplusStartup", "struct*", $tToken, "struct*", $tInput, "ptr", 0)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    $giGDIPToken = DllStructGetData($tToken, "Data")
    Return True
    EndFunc ;==>_GDIPlus_Startup
    Func _GDIPlus_StringFormatCreate($iFormat = 0, $iLangID = 0)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateStringFormat", "int", $iFormat, "word", $iLangID, "handle*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    If $aResult[0] Then Return SetError(10, $aResult[0], 0)
    Return $aResult[3]
    EndFunc ;==>_GDIPlus_StringFormatCreate
    Func _GDIPlus_StringFormatDispose($hFormat)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipDeleteStringFormat", "handle", $hFormat)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_StringFormatDispose
    Func _GDIPlus_StringFormatSetAlign($hStringFormat, $iFlag)
    Local $aResult = DllCall($ghGDIPDll, "int", "GdipSetStringFormatAlign", "handle", $hStringFormat, "int", $iFlag)
    If @error Then Return SetError(@error, @extended, False)
    If $aResult[0] Then Return SetError(10, $aResult[0], False)
    Return True
    EndFunc ;==>_GDIPlus_StringFormatSetAlign
    Func __GDIPlus_BrushDefCreate(ByRef $hBrush)
    If $hBrush = 0 Then
    $ghGDIPBrush = _GDIPlus_BrushCreateSolid()
    $hBrush = $ghGDIPBrush
    EndIf
    EndFunc ;==>__GDIPlus_BrushDefCreate
    Func __GDIPlus_BrushDefDispose($icurError = @error, $icurExtended = @extended)
    If $ghGDIPBrush <> 0 Then
    _GDIPlus_BrushDispose($ghGDIPBrush)
    $ghGDIPBrush = 0
    EndIf
    Return SetError($icurError, $icurExtended)
    EndFunc ;==>__GDIPlus_BrushDefDispose
    Func __GDIPlus_PenDefCreate(ByRef $hPen)
    If $hPen = 0 Then
    $ghGDIPPen = _GDIPlus_PenCreate()
    $hPen = $ghGDIPPen
    EndIf
    EndFunc ;==>__GDIPlus_PenDefCreate
    Func __GDIPlus_PenDefDispose($icurError = @error, $icurExtended = @extended)
    If $ghGDIPPen <> 0 Then
    _GDIPlus_PenDispose($ghGDIPPen)
    $ghGDIPPen = 0
    EndIf
    Return SetError($icurError, $icurExtended)
    EndFunc ;==>__GDIPlus_PenDefDispose
    Global Const $GUI_EVENT_CLOSE = -3
    Global Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG'
    Global Const $WS_SIZEBOX = 0x00040000
    Global Const $WM_PAINT = 0x000F
    Global Const $WM_ERASEBKGND = 0x0014
    Opt("MustDeclareVars", 1)
    Opt("GUIOnEventMode", 1)
    Global $iWidth = 610
    Global $iHeight = 200
    Global $hGui = GUICreate("GDI+ Path Tutorial", $iWidth, $iHeight)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    _GDIPlus_Startup()
    Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
    Global $hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight)
    Global $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hContext, 2)
    _GDIPlus_GraphicsClear($hContext, 0xFFFFFFFF)
    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    GUIRegisterMsg($WM_ERASEBKGND, "WM_PAINT")
    GUISetState()
    _DrawButton("Button", 10, 30, 160, 100, 0xFFDD3030)
    _DrawButton("Text", 210, 30, 160, 100, 0xFF30AA30)
    _DrawButton("Abcdefg", 410, 30, 190, 100, 0xFF3040DD)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    While Sleep(10)
    WEnd
    Func _DrawButton($sText, $fX, $fY, $fW, $fH, $iColor, $fRadius = 40)
    Local $hPath = _GDIPlus_PathCreate()
    _GDIPlus_PathAddArc($hPath, $fX, $fY, $fRadius, $fRadius, 180, 90)
    _GDIPlus_PathAddArc($hPath, $fX + $fW - $fRadius, $fY, $fRadius, $fRadius, 270, 90)
    _GDIPlus_PathAddArc($hPath, $fX + $fW - $fRadius, $fY + $fH - $fRadius, $fRadius, $fRadius, 0, 90)
    _GDIPlus_PathAddArc($hPath, $fX, $fY + $fH - $fRadius, $fRadius, $fRadius, 90, 90)
    Local $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, 0, $fH * 0.1)
    _GDIPlus_PathTransform($hPath, $hMatrix)
    Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath)
    _GDIPlus_PathBrushSetCenterPoint($hBrush, $fX + $fW * 0.5, $fY)
    _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFF000000)
    _GDIPlus_PathBrushSetSurroundColor($hBrush, 0x00000000)
    _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 1)
    _GDIPlus_PathBrushSetFocusScales($hBrush, 0.85, 0.85)
    _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_MatrixTranslate($hMatrix, 0, -$fH * 0.2)
    _GDIPlus_PathTransform($hPath, $hMatrix)
    $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath)
    _GDIPlus_PathBrushSetCenterPoint($hBrush, $fX + $fW * 0.5, $fY)
    _GDIPlus_PathBrushSetCenterColor($hBrush, $iColor)
    Local $iR = Int(BitAND(BitShift($iColor, 16), 0xFF) * 0.3)
    Local $iG = Int(BitAND(BitShift($iColor, 8), 0xFF) * 0.3)
    Local $iB = Int(BitAND($iColor, 0xFF) * 0.3)
    Local $iColor2 = BitOR(BitShift($iR, -16), BitShift($iG, -8), $iB)
    _GDIPlus_PathBrushSetSurroundColor($hBrush, BitOR(0xFF000000, $iColor2))
    _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 1)
    _GDIPlus_PathBrushSetFocusScales($hBrush, 0.97, 0.3)
    _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush)
    _GDIPlus_BrushDispose($hBrush)
    $fRadius *= 0.6
    _GDIPlus_PathReset($hPath)
    _GDIPlus_PathAddArc($hPath, $fX + $fRadius * 0.2, $fY, $fRadius, $fRadius, 90, 180)
    _GDIPlus_PathAddArc($hPath, $fX + $fW - $fRadius * 1.2, $fY, $fRadius, $fRadius, 270, 180)
    $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath)
    _GDIPlus_PathBrushSetCenterPoint($hBrush, $fX + $fW * 0.5, $fY + $fRadius * 0.2)
    _GDIPlus_PathBrushSetCenterColor($hBrush, 0xDDFFFFFF)
    _GDIPlus_PathBrushSetSurroundColor($hBrush, 0x00000000)
    _GDIPlus_PathBrushSetFocusScales($hBrush, 0.8, 0.2)
    _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1, 0.9)
    _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_PathReset($hPath)
    Local $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    Local $hFormat = _GDIPlus_StringFormatCreate()
    _GDIPlus_StringFormatSetAlign($hFormat, 1)
    DllCall($ghGDIPDll, "int", "GdipSetStringFormatLineAlign", "handle", $hFormat, "int", 1)
    Local $tLayout = _GDIPlus_RectFCreate($fX, $fY, $fW, $fH)
    _GDIPlus_PathAddString($hPath, $sText, $tLayout, $hFamily, 0, 32, $hFormat)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath)
    _GDIPlus_MatrixSetElements($hMatrix)
    _GDIPlus_MatrixTranslate($hMatrix, -($aBounds[0] + $aBounds[2] / 2) + $fX + $fW / 2, -($aBounds[1] + $aBounds[3] / 2) + $fY + $fH * 0.48)
    _GDIPlus_MatrixDispose($hMatrix)
    $aBounds = _GDIPlus_PathGetWorldBounds($hPath)
    $hBrush = _GDIPlus_LineBrushCreate(0, $aBounds[1] - 4, 0, $aBounds[1] + $aBounds[3] + 4, BitOR(0x40000000, $iColor2), 0x40FFFFFF)
    Local $hPen = _GDIPlus_PenCreate2($hBrush, 4)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDrawPath($hContext, $hPath, $hPen)
    _GDIPlus_PenDispose($hPen)
    $hPen = _GDIPlus_PenCreate(BitOR(0x70000000, $iColor2), 2)
    _GDIPlus_GraphicsDrawPath($hContext, $hPath, $hPen)
    _GDIPlus_PenDispose($hPen)
    $hBrush = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    _GDIPlus_GraphicsFillPath($hContext, $hPath, $hBrush)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_PathDispose($hPath)
    EndFunc ;==>_DrawButton
    Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_PAINT
    Func _Exit()
    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    Gruß,
    UEZ

  • Eigener GDIPlus Button Style

    • UEZ
    • 20. Dezember 2013 um 22:23

    Du kannst die Funktionen aus der Beta inkludieren, entweder manuell oder per Wrapper.

    [autoit]


    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/SO

    [/autoit]

    Du benötigst die SciTE Vollversion (separate Datei).

    Nach dem Kompilieren solltest du eine <Dein_Skript>_Obfuscated.au3 in dem gleichen Verzeichnis finden. In diesem Skript sind alle Variablen / Funktionen aus den Include Dateien integriert. Du kannst nun die entsprechenden Funktionen und Variablen in dein Skript kopieren, so dass dein Skript auch mit der aktuellen finalen Version läuft.


    Gruß,
    UEZ

  • Eigener GDIPlus Button Style

    • UEZ
    • 20. Dezember 2013 um 21:45

    "Probieren geht über studieren".

    Dazu kann ich nichts sagen, da ich deine Skripte nicht kenne, aber einige "Script Breaking Changes" gibt es schon.


    Die Beta ersetzt nicht die aktuelle Version, sondern sie wird parallel installiert und du kannst die Beta mit Alt+F5 aufrufen.

    Gruß,
    UEZ

  • Eigener GDIPlus Button Style

    • UEZ
    • 20. Dezember 2013 um 21:39

    Dann lade die Beta doch einfach herunter und installiere sie. Ansonsten warte bis die Finale Version veröffentlicht wird (bald ist Weihnachten ;) )

    Gruß,
    UEZ

  • Eigener GDIPlus Button Style

    • UEZ
    • 20. Dezember 2013 um 21:07

    Probiere es mal mit Alt+F5.

    Gruß,
    UEZ

  • Eigener GDIPlus Button Style

    • UEZ
    • 20. Dezember 2013 um 21:01

    Die aktuelle Beta beinhaltet eine Menge der GDIPlus Funktionen aus der GDIP.au3.


    Gruß,
    UEZ

  • Skalieren von Bildern ohne Verzerrung

    • UEZ
    • 20. Dezember 2013 um 17:20

    Z.B. hier: http://www.autoitscript.com/forum/files/fi…it-v33925-beta/


    Gruß,
    UEZ

  • Skalieren von Bildern ohne Verzerrung

    • UEZ
    • 20. Dezember 2013 um 17:13

    Kannst dazu die Beta benutzen -> _GDIPlus_ImageResize() und als $iInterpolationMode Parameter $GDIP_INTERPOLATIONMODE_NEARESTNEIGHBOR verwenden.

    $GDIP_INTERPOLATIONMODE_NEARESTNEIGHBOR = 5

    Gruß,
    UEZ

  • Icon aus Datei extrahieren?

    • UEZ
    • 18. Dezember 2013 um 12:10

    War eher als Alternative gedacht... ;)

    Gruß,
    UEZ

  • Icon aus Datei extrahieren?

    • UEZ
    • 18. Dezember 2013 um 09:36

    Wenn du das Icon als Bitmap benötigst, kannst du z.B.

    [autoit]

    $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 32, 48, 48)

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

    $hBitmap = _GDIPlus_BitmapCreateFromHICON32($hIcon)

    [/autoit]


    benutzen.

    Benötigt die aktuelle Beta.

    Gruß,
    UEZ

  • LED - Laufschrift

    • UEZ
    • 15. Dezember 2013 um 15:05

    In Zeile 68 einfach eine 8 in die Hex-Anweisung mitgeben ->

    [autoit]

    If Hex(DllStructGetData($PixelData, 1), 8) = $Color Then

    [/autoit]

    Dann sollte es funzen. In diesem Beitrag weiter unten gibt es die LEDTXT.au3...

    Gruß,
    UEZ

  • FASM UDF (X86 u X64)

    • UEZ
    • 5. Dezember 2013 um 22:15

    Andy: _GDIPlus_BitmapCreateFromScan0() hatte ich geändert, da $iStride und $pScan0 eher selten genutzt werden und somit am Ende besser aufgehoben sind. Am besten die neuste Beta benutzen. ;)

    Btw,
    ich würde gerne eine Bitmap mit zufälligen Grauwerten immer wieder füllen lassen, aber ich scheitere gerade an der Random Funktion.

    Keine Ahnung, was noch zur Hürde wird.

    Mein Ansatz war dieser:

    Code
    #  Rand:
    #        mov     eax,[X0]
    #        mov     edx,69069
    #        mul     edx
    #        inc     eax
    #        mov     [X0],eax
    #        ret
    
    
    #X0: db 1


    aber dann schmiert das Skript ab.

    Gruß,
    UEZ

  • FASM UDF (X86 u X64)

    • UEZ
    • 5. Dezember 2013 um 21:06
    Zitat von eukalyptus


    Und dann experimentier mal mit DEINER Materie - GdiPlus ;)

    lgE

    Mit UNSERER Materie bitte! :D

    Ich werde mich daran versuchen...

    Hier auch blau zu weiß ASM Code (war nicht so schwer):

    Code
    #ASM _ASM_Red2White
    #    use32
    #    mov esi, [esp+4]
    #    mov ecx, [esp+8]
    
    
    #    _Loop:
    #       mov eax, [esi]
    #       _FASM_DBG("_Debug_1")
    
    
    #       cmp eax, 0xFFFF0000
    #       je _Red2White
    #       cmp eax, 0xFF0000FF
    #		je _Blue2White
    #		jmp _NotEqual
    
    
    #	_Red2White:
    #   	mov dword[esi], 0xFFFFFFFF
    #       _FASM_DBG("_Debug_2")
    #		jmp _NotEqual
    
    
    #	_Blue2White:
    #       mov dword[esi], 0xFFFFFFFF
    #       _FASM_DBG("_Debug_2")
    
    
    #	_NotEqual:
    
    
    #       add esi, 4
    #       sub ecx, 1
    #       jg _Loop
    
    
    #	ret 8
    #ASMEND
    Alles anzeigen

    Danke und Gruß,
    UEZ

  • FASM UDF (X86 u X64)

    • UEZ
    • 5. Dezember 2013 um 13:24

    Klasse Umsetzung! 8o:thumbup:

    Ich glaube, dass ich doch endlich ASM lernen sollte, damit ich die feinen ASM Sachen hier aus dem Forum anwenden kann.

    Habe bereits mit minx' ASM Tutorial angefangen, aber hat sich wieder im Sande verlaufen... :(

    Vielleicht könnte man ein paar Beispiele mit ASM strukturiert aufsetzen und die Hürde AMS zu lernen dadurch herabsetzen. Ich denke da an ein separates Thema mit "How to Code in ASM", wo dann Beispiele gepostet werden. gibt's ja schon :whistling: -> https://autoit.de/index.php?page=Thread&amp;postID=181436 (Danke an TheShadowAE für den Hinweis)!

    Gruß,
    UEZ

  • Happy Birthday Pee und funkey

    • UEZ
    • 4. Dezember 2013 um 10:53

    Herzlichen Glückwunsch zum Geburtstag und alles Gute!

    [Blockierte Grafik: http://www.hotel-luganodante.com/uploads/happyBirthday_mypage.jpg]


    Gruß,
    UEZ

  • kurze frage :)

    • UEZ
    • 3. Dezember 2013 um 09:57

    Kurze Antwort: probiere es mal damit:

    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    $hGUI = GUICreate("Form1", 279, 40, -1, -1)
    $Input1 = GUICtrlCreateInput("", 8, 8, 33, 21, $ES_NUMBER)
    $Input2 = GUICtrlCreateInput("", 55, 8, 33, 21, $ES_NUMBER)
    $Input3 = GUICtrlCreateInput("", 103, 8, 33, 21, $ES_NUMBER)
    $Input4 = GUICtrlCreateInput("", 146, 8, 33, 21, $ES_NUMBER)
    $x = GUICtrlCreateLabel("-", 45, 9, 7, 17)
    $Label2 = GUICtrlCreateLabel("-", 139, 9, 9, 17)
    $Label3 = GUICtrlCreateLabel("-", 92, 9, 9, 17)
    $Zahl = GUICtrlCreateButton("Zahl", 192, 8, 75, 25)
    GUISetState(@SW_SHOW)
    ControlFocus($hGUI, "", $Zahl)

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Zahl
    MsgBox(0, "Zufallszahl", GUICtrlRead($Input1) & "-" & GUICtrlRead($Input2) & "-" & GUICtrlRead($Input3) & "-" & GUICtrlRead($Input4))
    EndSwitch
    $aMousePos = GUIGetCursorInfo($hGUI)
    Switch $aMousePos[4]
    Case $Input1
    GUICtrlSetData($Input1, StringFormat("%04d", Random(0, 9999, 1)))
    Case $Input2
    GUICtrlSetData($Input2, StringFormat("%04d", Random(0, 9999, 1)))
    Case $Input3
    GUICtrlSetData($Input3, StringFormat("%04d", Random(0, 9999, 1)))
    Case $Input4
    GUICtrlSetData($Input4, StringFormat("%04d", Random(0, 9999, 1)))
    EndSwitch
    WEnd

    [/autoit]

    Einfach mit der Maus über die Input Felder gehen...

    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™