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

  • Musik Datei analysieren - Vorzugsweise Morsecode - dringend

    • UEZ
    • 30. März 2011 um 19:11

    Schaue mal in die Console! ;)

    Gruß,
    UEZ

  • Musik Datei analysieren - Vorzugsweise Morsecode - dringend

    • UEZ
    • 30. März 2011 um 16:11

    Sehr interessante Spielerei und klasse Lösung eukalyptus :thumbup:

    Gruß,
    UEZ

  • User einlesen

    • UEZ
    • 29. März 2011 um 22:22

    Hier die WMI Version, um die Benutzer auszulesen:

    Spoiler anzeigen
    [autoit]


    #include <GuiComboBox.au3>
    #include <GUIConstantsEx.au3>
    $Form1 = GUICreate("Sperrung / Freigabe", 417, 315, 287, 147)
    $Label1 = GUICtrlCreateLabel("Benutzername", 10, 72, 109, 24)
    $hCombo = GUICtrlCreateCombo("", 120, 72, 289, 24)
    GUICtrlSetData(-1, Get_Users())
    _GUICtrlComboBox_SetCurSel ($hCombo, 0)
    $Label2 = GUICtrlCreateLabel("Montag", 29, 122, 49, 17)
    $Label3 = GUICtrlCreateLabel("Dienstag", 23, 150, 55, 20)
    $Label4 = GUICtrlCreateLabel("Mittwoch", 27, 176, 51, 19)
    $Label5 = GUICtrlCreateLabel("Donnerstag", 8, 204, 70, 18)
    $Label6 = GUICtrlCreateLabel("Freitag", 36, 231, 42, 20)
    $Label7 = GUICtrlCreateLabel("Samstag", 25, 258, 53, 19)
    $Label8 = GUICtrlCreateLabel("Sonntag", 29, 285, 49, 19)
    $Label9 = GUICtrlCreateLabel("von", 89, 104, 24, 16)
    $Label10 = GUICtrlCreateLabel("bis", 122, 105, 20, 14)
    $Input1 = GUICtrlCreateInput("0", 88, 120, 25, 24)
    $Input2 = GUICtrlCreateInput("23", 120, 120, 25, 24)
    $Input3 = GUICtrlCreateInput("0", 88, 147, 25, 24)
    $Input4 = GUICtrlCreateInput("23", 120, 147, 25, 24)
    $Input5 = GUICtrlCreateInput("0", 88, 174, 25, 24)
    $Input6 = GUICtrlCreateInput("23", 120, 174, 25, 24)
    $Input7 = GUICtrlCreateInput("0", 88, 201, 25, 24)
    $Input8 = GUICtrlCreateInput("23", 120, 201, 25, 24)
    $Input9 = GUICtrlCreateInput("0", 88, 228, 25, 24)
    $Input10 = GUICtrlCreateInput("23", 120, 228, 25, 24)
    $Input11 = GUICtrlCreateInput("0", 88, 255, 25, 24)
    $Input12 = GUICtrlCreateInput("23", 120, 255, 25, 24)
    $Input13 = GUICtrlCreateInput("0", 88, 282, 25, 24)
    $Input14 = GUICtrlCreateInput("23", 120, 282, 25, 24)
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

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

    Func Get_Users($system = ".")
    Local $Users
    Local $objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & $system & "\root\cimv2")
    Local $colItems = $objWMIService.ExecQuery("SELECT Caption FROM Win32_UserAccount WHERE Disabled = False", "WQL", 0x30)
    For $objItem In $colItems
    $Users &= $objItem.Caption & "|"
    Next
    Return $Users
    EndFunc

    [/autoit]

    Gruß,
    UEZ

  • [GDI+] Verwischen / Unscharf machen

    • UEZ
    • 28. März 2011 um 20:55

    Hier eine alternativ Funktion von Eukalyptus:

    [autoit]


    Func _Blur($hBitmap, $iW, $iH, $fScale = 0.175, $qual = 6); by eukalyptus
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND(_WinAPI_GetDesktopWindow())
    Local $hBmpSmall = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    Local $hGfxSmall = _GDIPlus_ImageGetGraphicsContext($hBmpSmall)

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

    Local $hBmpBig = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    Local $hGfxBig = _GDIPlus_ImageGetGraphicsContext($hBmpBig)

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

    _GDIPlus_GraphicsScaleTransform($hGfxSmall, $fScale, $fScale)
    _GDIPlus_GraphicsSetInterpolationMode($hGfxSmall, $qual)

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

    _GDIPlus_GraphicsScaleTransform($hGfxBig, 1 / $fScale, 1 / $fScale)
    _GDIPlus_GraphicsSetInterpolationMode($hGfxBig, $qual)

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

    _GDIPlus_GraphicsDrawImageRect($hGfxSmall, $hBitmap, 0, -5, $iW, $iH + 12)
    _GDIPlus_GraphicsDrawImageRect($hGfxBig, $hBmpSmall, 0, -3, $iW, $iH + 9)

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

    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_BitmapDispose($hBmpSmall)
    _GDIPlus_GraphicsDispose($hGfxSmall)
    _GDIPlus_GraphicsDispose($hGfxBig)
    Return $hBmpBig
    EndFunc ;==>_Blur

    [/autoit]

    Gruß,
    UEZ

  • Höchsten Farbanteil ausgeben.

    • UEZ
    • 27. März 2011 um 22:24
    Zitat von pretrojaner


    nun wenn ich z.b. nur ein SW Bild habe mit 60% Schwarzanteil so kann ich mir sicher leicht eine Funktion basteln die mir die Farbe Schwarz als höchsten Farbanteil ausgibt.

    Wie mache ich das nun bei einem Farbbild ? Muss ich da wirklich pixel für pixel die farbanteile durchgehen? könnte mir vorstellen das dieses zu lange dauert bei großen bildern. vileicht gehts ja auch anderst ?

    Gruß
    Pre

    Wie willst du den Anteil herausbekommen, wenn du nicht jedes Pixel auf den Farbwert prüfst?

    Hier muss man mal in GDIp.au3 schauen oder eine schnelle ASM Routine basteln.

    Gruß,
    UEZ

  • Must Have Programme auf dem Rechner

    • UEZ
    • 27. März 2011 um 21:53

    Eigentlich auch mein Motto: IBM (Immer Besser Manuel) ;)

    Gruß,
    UEZ

  • Must Have Programme auf dem Rechner

    • UEZ
    • 27. März 2011 um 21:14

    Hier eine nette Seite, um seine Must Have Apps (Freeware) zu installieren: http://ninite.com/

    Gruß,
    UEZ

  • Screenshoot rahmen abschneiden

    • UEZ
    • 27. März 2011 um 20:51

    Probiere es mal mit dieser Funktion:

    [autoit]


    Func __ScreenCapture_CaptureWnd($sFileName, $hWnd, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $maximized = False)
    Local $dex = 4, $dey = 1
    Local $tRect = _WinAPI_GetWindowRect($hWnd)
    If BitAND($maximized, 32) Then
    $dex = 8
    $dey = 8
    EndIf
    $iLeft += DllStructGetData($tRect, "Left")
    $iTop += DllStructGetData($tRect, "Top")
    If $iRight = -1 Then $iRight = DllStructGetData($tRect, "Right") - DllStructGetData($tRect, "Left")
    If $iBottom = -1 Then $iBottom = DllStructGetData($tRect, "Bottom") - DllStructGetData($tRect, "Top")
    $iRight += DllStructGetData($tRect, "Left")
    $iBottom += DllStructGetData($tRect, "Top")
    If $iLeft > DllStructGetData($tRect, "Right") Then $iLeft = DllStructGetData($tRect, "Left")
    If $iTop > DllStructGetData($tRect, "Bottom") Then $iTop = DllStructGetData($tRect, "Top")
    If $iRight > DllStructGetData($tRect, "Right") Then $iRight = DllStructGetData($tRect, "Right")
    If $iBottom > DllStructGetData($tRect, "Bottom") Then $iBottom = DllStructGetData($tRect, "Bottom")
    Return _ScreenCapture_Capture($sFileName, $iLeft + $dex, $iTop + $dey, $iRight - $dex, $iBottom- $dey, False)
    EndFunc ;==>_ScreenCapture_CaptureWnd

    [/autoit]

    Ist aus AutoIt Windows Screenshooter .

    Gruß,
    UEZ

  • Wechselt/Updatet ihr euren Browser?

    • UEZ
    • 23. März 2011 um 21:42

    Seit dem ich Probleme beim Posten im engl. Forum habe, benutze ich Iron für autoitscript.com und autoit.de, auf der Arbeit für Intranetseiten IE9, sonst FF 3/4.

    Iron gefällt mir eigentlich ganz gut.

    Opera benutze ich so gut wie nie.

    Alle Browser, bis auf IE, sind portable Versionen.

    Gruß,
    UEZ

  • C++ oder Java?

    • UEZ
    • 23. März 2011 um 20:41

    Java hat einen Vorteil gegenüber C++: es ist Plattform unabhängig, wobei Java ähnliche Syntax hat wie C++.

    Ich versuche auch seit einigen Jahren mit C++ anzufangen, aber mir fehlt noch der Einstieg, zumal ich mich an AutoIt sehr gewöhnt habe und keine zeitkritischen Anwendungen schreiben muss.

    Viel Spaß mit C++.

    Selam,
    UEZ

  • Write Text on Bitmap v0.92 Build 2013-02-16 Beta

    • UEZ
    • 23. März 2011 um 10:58

    Hier eine UDF zum Beschreiben von Bitmaps.

    Die Idee stammt von hier: SaveBitmap.

    [autoit]

    #include-once
    #include <GDIPlus.au3>
    Opt('MustDeclareVars', 1)
    ;======================================================================================
    ; Function Name: _GDIPlus_WTOB (Write Text On Bitmap)
    ; Description:Loads a bitmap and writes a text on it
    ;
    ; Parameters: $sIn:filename of the bitmap or a handle to a bitmap
    ; $sText:the text which will be written onto the bitmap centered
    ; Optional:
    ; $fName:font name to be used
    ; $fSize:fonst size of the text
    ;$iX:x position of font - if x and y set $iAlignX and $iAlignY will be skipped
    ;$iY:y position of font
    ;$iAlignX:align the font center, left, right (0, 1, 2) on x axis
    ;$iAlignY:align the font center, top, buttom (0, 1, 2) on y axis
    ;$iFColor:color of font
    ;$ebg:enable background black painting to get contrast with font color
    ; $save:if set to 1 bitmap will be saved
    ; $sFilename:filename of the save bitmap, if no extension is given PNG will be used instead
    ; $iJPGQ:jpg image save quality -> 0: worst, 100: best
    ;$draw_bgrect draws a filled transparent rectangle to make the font better readable
    ;$iDrawBGRect_c color of filled transparent rectangle
    ;
    ; Error codes:
    ;1: image file not found
    ;2: no text given
    ;3: no font given
    ;4: wrong font size - must be greater then 0
    ;5: wrong align x value
    ;6: wrong align y value
    ;7: unable to create bitmap from scan 0
    ;8: unable to save image
    ;
    ; Requirement(s):GDIplus.au3
    ; Return Value(s): Success: handle to bitmap, Error: 0
    ; Author(s):UEZ
    ; Version:v0.92 Build 2013-02-16 Beta
    ;=======================================================================================
    Func _GDIPlus_WTOB($sIn, $sText, $fName = "Impact", $fSize = 11, $iX = -1, $iY = -1, $iAlignX = 2, $iAlignY = 2, $iFColor = 0xFFFFFFFF, $ebg = True, $save = False, $sFilename = "WTOB.png", $iJPGQ = 90, $draw_bgrect = False, $iDrawBGRect_c = 0xFF808080)
    Local $handle = False, $hImage, $declared = True
    If IsPtr($sIn) Then $handle = True
    If (Not $handle) And ($sIn = "" Or Not FileExists($sIn)) Then Return SetError(1, 0, "File not found")
    If $sText = "" Then Return SetError(2, 0, "No text given")
    If $fName = "" Then SetError(3, 0, "No font given")
    If Not IsInt($fSize) And $fSize > 0 Then Return SetError(4, 0, "Wrong font size")
    If $iAlignX < 0 Or $iAlignX > 2 Then Return SetError(5, 0, "Wrong align x value")
    If $iAlignY < 0 Or $iAlignY > 2 Then Return SetError(6, 0, "Wrong align y value")

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

    If Not $__g_hGDIPDll Then
    _GDIPlus_Startup()
    $declared = False
    EndIf

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

    If Not $handle Then
    $hImage = _GDIPlus_ImageLoadFromFile($sIn)
    Else
    $hImage = $sIn
    EndIf
    Local $iW = _GDIPlus_ImageGetWidth($hImage)
    Local $iH = _GDIPlus_ImageGetHeight($hImage)

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

    Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
    If @error Then Return SetError(7, @extended, "Unable to create bitmap from scan 0")
    Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hContext, 2)
    DllCall($__g_hGDIPDll, "int", "GdipSetInterpolationMode", "handle", $hContext, "int", 7)
    DllCall($__g_hGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hContext, "int", 4)

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

    Local $hPinsel = _GDIPlus_BrushCreateSolid($iFColor)
    Local $hFormat = _GDIPlus_StringFormatCreate()
    Local $hFamily = _GDIPlus_FontFamilyCreate($fName)
    ;~ Local $font_size = Floor(($iW - StringLen($sText)) / $fSize)
    Local $hFont = _GDIPlus_FontCreate($hFamily, $fSize, 1)
    Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
    Local $aInfo = _GDIPlus_GraphicsMeasureString($hContext, $sText, $hFont, $tLayout, $hFormat)

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

    _GDIPlus_GraphicsDrawImageRect($hContext, $hImage, 0, 0, $iW, $iH)

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

    Local $fWidth = DllStructGetData($aInfo[0], "Width")
    Local $fHeight = DllStructGetData($aInfo[0], "Height")

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

    If $iX < 0 Then
    Switch $iAlignX
    Case 0 ;alignment center
    DllStructSetData($tLayout, "x", $iW / 2 - Round($fWidth / 2, 0))
    Case 1 ;alignment left
    DllStructSetData($tLayout, "x", 0)
    Case 2 ;alignment right
    DllStructSetData($tLayout, "x", $iW - $fWidth - 1)
    EndSwitch
    Else
    DllStructSetData($tLayout, "x", $iX)
    EndIf

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

    If $iY < 0 Then
    Switch $iAlignY
    Case 0 ;alignment center
    DllStructSetData($tLayout, "y", $iH / 2 - Floor($fHeight / 2))
    Case 1 ;alignment top
    DllStructSetData($tLayout, "y", 0)
    Case 2 ;alignment buttom
    DllStructSetData($tLayout, "y", $iH - $fHeight - 1)
    EndSwitch
    Else
    DllStructSetData($tLayout, "y", $iY)
    EndIf

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

    Local $hBrush_rect = _GDIPlus_BrushCreateSolid($iDrawBGRect_c)
    If $draw_bgrect Then _GDIPlus_GraphicsFillRect($hContext, DllStructGetData($tLayout, "x"), DllStructGetData($tLayout, "y"), $fWidth, $fHeight, $hBrush_rect)

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

    Local $i, $fs = $fSize * 0.075
    Local $hBrush_back = _GDIPlus_CreateLineBrush(0, 0, 0, $fSize, 0xFF000000, 0xFF808080)
    Local $tLayout2 = _GDIPlus_RectFCreate(0, 0, 0, 0)
    DllStructSetData($tLayout2, "Width", $fWidth)
    DllStructSetData($tLayout2, "Height", $fHeight)
    If $ebg Then
    For $i = 0 To 3
    Switch $i
    Case 0
    DllStructSetData($tLayout2, "x", DllStructGetData($tLayout, "x"))
    DllStructSetData($tLayout2, "y", DllStructGetData($tLayout, "y") - $fs)
    Case 1
    DllStructSetData($tLayout2, "x", DllStructGetData($tLayout, "x") + $fs)
    DllStructSetData($tLayout2, "y", DllStructGetData($tLayout, "y"))
    Case 2
    DllStructSetData($tLayout2, "x", DllStructGetData($tLayout, "x"))
    DllStructSetData($tLayout2, "y", DllStructGetData($tLayout, "y") + $fs)
    Case 3
    DllStructSetData($tLayout2, "x", DllStructGetData($tLayout, "x") - $fs)
    DllStructSetData($tLayout2, "y", DllStructGetData($tLayout, "y"))
    EndSwitch
    _GDIPlus_GraphicsDrawStringEx($hContext, $sText, $hFont, $tLayout2, $hFormat, $hBrush_back)
    Next
    EndIf
    _GDIPlus_GraphicsDrawStringEx($hContext, $sText, $hFont, $tLayout, $hFormat, $hPinsel)

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

    _GDIPlus_ImageDispose($hImage)
    Local $err = 0
    If $save Then
    If StringRight($sFilename, 4) = ".jpg" Then
    Local $sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
    Local $tParams = _GDIPlus_ParamInit(1)
    Local $tData = DllStructCreate("int Quality")
    DllStructSetData($tData, "Quality", $iJPGQ) ;quality 0-100
    Local $pData = DllStructGetPtr($tData)
    _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData)
    Local $pParams = DllStructGetPtr($tParams)
    If Not _GDIPlus_ImageSaveToFileEx($hBitmap, $sFilename, $sCLSID, $pParams) Then $err = 8
    $tParams = 0
    $tData = 0
    Else
    If StringMid($sFilename, StringLen($sFilename) - 3, 1) <> "." Then $sFilename &= ".png"
    If Not _GDIPlus_ImageSaveToFile($hBitmap, $sFilename) Then $err = 8
    EndIf
    EndIf
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hPinsel)
    _GDIPlus_BrushDispose($hBrush_rect)
    _GDIPlus_BrushDispose($hBrush_back)
    _GDIPlus_GraphicsDispose($hContext)
    If Not $declared Then _GDIPlus_Shutdown()
    $tLayout = 0
    $tLayout2 = 0
    Return SetError($err, 0, $hBitmap)
    EndFunc ;==>WTOB

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

    Func _GDIPlus_CreateLineBrush($iPoint1X, $iPoint1Y, $iPoint2X, $iPoint2Y, $iArgb1 = 0xFF0000FF, $iArgb2 = 0xFFFF0000, $WrapMode = 1)
    Local $tPoint1, $pPoint1, $tPoint2, $pPoint2, $aRet
    If $iArgb1 = "" Then $iArgb1 = 0xFF0000FF
    If $iArgb2 = "" Then $iArgb2 = 0xFFFF0000
    If $WrapMode = -1 Then $WrapMode = 0
    $tPoint1 = DllStructCreate("float X;float Y")
    $pPoint1 = DllStructGetPtr($tPoint1)
    DllStructSetData($tPoint1, "X", $iPoint1X)
    DllStructSetData($tPoint1, "Y", $iPoint1Y)
    $tPoint2 = DllStructCreate("float X;float Y")
    $pPoint2 = DllStructGetPtr($tPoint2)
    DllStructSetData($tPoint2, "X", $iPoint2X)
    DllStructSetData($tPoint2, "Y", $iPoint2Y)
    $aRet = DllCall($__g_hGDIPDll, "int", "GdipCreateLineBrush", "ptr", $pPoint1, "ptr", $pPoint2, "int", $iArgb1, "int", $iArgb2, "int", $WrapMode, "int*", 0)
    Return $aRet[6]
    EndFunc ;==>_GDIPlus_CreateLineBrush

    [/autoit]

    Gruß,
    UEZ

    Dateien

    _GDIPlus_WTOB (Write Text on Bitmap) v0.92 Build 2013-02-16 Beta.7z 55,85 kB – 434 Downloads
  • unrar.exe commandlinetool Prozentwert auslesen

    • UEZ
    • 22. März 2011 um 20:11

    Hier ein Tool von Valik, wie man für 7-Zip die Prozente auslesen kann -> http://www.autoitscript.com/forum/topic/71…__1#entry527810

    Vielleicht kann man das auch für unrar.exe umsetzen oder du verwendest 7-Zip für das Entpacken.

    Gruß,
    UEZ

  • Ascii in au3

    • UEZ
    • 22. März 2011 um 11:10

    Probiere es mal mit ChrW():

    [autoit]


    #include <GUIConstantsEx.au3>
    $hGUI = GUICreate("Test", 320, 256)
    $label = GUICtrlCreateLabel("Test â–º " & ChrW(8658), 100, 100)
    GUISetState()

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

    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Gruß,
    UEZ

  • Computer-Info

    • UEZ
    • 21. März 2011 um 17:32

    Probiert mal dies:

    Spoiler anzeigen
    [autoit]


    If @OSArch = "X86" Then
    $DigitalProductId = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId")
    Else
    $DigitalProductId = RegRead("HKLM64\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId")
    EndIf

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

    MsgBox(0, "Decode Product Key", _DecodeProductKey($DigitalProductId))

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

    Func _DecodeProductKey($BinaryDPID)
    Local $bKey[15]
    Local $sKey[29]
    Local $Digits[24]
    Local $Value = 0
    Local $hi = 0
    Local $n = 0
    Local $i = 0
    Local $dlen = 29
    Local $slen = 15
    Local $Result

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

    $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")

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

    $BinaryDPID = StringMid($BinaryDPID, 107, 30)

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

    For $i = 1 To 29 Step 2
    $bKey[Int($i / 2)] = Dec(StringMid($BinaryDPID, $i, 2))
    Next

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

    For $i = $dlen - 1 To 0 Step -1
    If Mod(($i + 1), 6) = 0 Then
    $sKey[$i] = "-"
    Else
    $hi = 0
    For $n = $slen - 1 To 0 Step -1
    $Value = BitOR(BitShift($hi, -8), $bKey[$n])
    $bKey[$n] = Int($Value / 24)
    $hi = Mod($Value, 24)
    Next
    $sKey[$i] = $Digits[$hi + 1]
    EndIf

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

    Next
    For $i = 0 To 28
    $Result = $Result & $sKey[$i]
    Next

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

    Return $Result
    EndFunc ;==>DecodeProductKey

    [/autoit]

    Gruß,
    UEZ

  • Screenshot von Web Seiten

    • UEZ
    • 18. März 2011 um 13:05
    Zitat von andygo

    und gleich noch eine frage im anschluss: könnte man den code auch so verändern das wenn eine seite > 8192 ist, erst von 0 bis 8192 ge-screent wird, zwischengelagert, dann von 8192 bis ende (bzw. bis 16.384)... u.s.w. und dann die teile per gdi+ zusammenfügt zu einem bild?

    Sowas ähnliches hat Eukalyptus bereits gemacht (siehe Post#10). Aber ich werde es auch mal bei Gelegenheit probieren..


    Warum das Limit bei 8192 = 2^13 = 0x2000 = 10000000000000 ist, weiß wohl MS am besten. Ich bin mal gespannt, was es noch für Probleme mit den IE Funktionen in AutoIt bzgl. IE9 geben wird.

    Gruß,
    UEZ

  • Screenshot von Web Seiten

    • UEZ
    • 18. März 2011 um 11:41

    Hmmm, warum plötzlich die Beschränkung auf 8192? ?(

    Aber egal, jetzt weiß ich es ja :D

    Danke andygo!


    Habe den Code aktualisiert.


    Gruß,
    UEZ

  • Screenshot von Web Seiten

    • UEZ
    • 18. März 2011 um 10:07

    Ich habe vorgestern IE9 installiert und nun wird z.B. https://autoit.de/www.stern.de nur weiß gerendert, wobei beim ersten Rendern die Seite noch angezeigt wird.

    Beim ersten Rendern wird die Höhe des Fensters ermittelt, die dann beim zweiten Rendern benutzt wird, um den Screenshot von der Webseite zu erstellen.

    Hat jemand eine Idee, warum das jetzt so ist bzw. kann jemand das mal testen (mit IE9 und Aero!), ob das Fenster auch weiß bleibt? Der Screenshot wird in den Clipboard geschickt.

    Der Code ist im ersten Post!

    Gruß,
    UEZ

  • Scaneffekt Bild

    • UEZ
    • 16. März 2011 um 14:16

    Hatte ich vergessen zu posten:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2011-03-16
    #include <GDIPlus.au3>
    Opt("GUIOnEventMode", 1)

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

    _GDIPlus_Startup ()
    $hImage = _GDIPlus_ImageLoadFromFile("..\..\Images\earth_small2.bmp")
    If Not $hImage Then
    _GDIPlus_Shutdown()
    Exit
    EndIf
    $iW = _GDIPlus_ImageGetWidth($hImage)
    $iH = _GDIPlus_ImageGetHeight($hImage)
    $hGUI = GUICreate("GDI+ Test", $iW, $iH)
    GUISetState()

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

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic)
    $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    $hBrush = _GDIPlus_BrushCreateSolid(0)

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

    $b = 1 + Floor($iW / 5)
    $x = -$b

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

    $hScannerBitmap = _GDIPlus_BitmapCreateFromGraphics($b, $iH, $hGraphic)
    $hContext = _GDIPlus_ImageGetGraphicsContext($hScannerBitmap)
    $alpha_start = 0x04
    $alpha_end = 0xD0
    $alpha_steps = ($alpha_end - $alpha_start) / $b
    $alpha = $alpha_start

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

    For $i = 0 To $b
    $alpha += $alpha_steps
    _GDIPlus_BrushSetSolidColor($hBrush, "0x" & Hex($alpha, 2) & "00FF00")
    _GDIPlus_GraphicsFillRect($hContext, $i, 0, 1, $iH, $hBrush)
    Next
    GUISetOnEvent(-3, "_Exit")

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

    While Sleep(20)
    If Mod($x + $b, 30) < 15 Then
    WinSetTitle($hGUI, "", "Scanning ...")
    Else
    WinSetTitle($hGUI, "", "")
    EndIf
    _GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hImage, 0, 0, $iW, $iH)
    _GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hScannerBitmap, $x, 0, $b, $iH)
    $x += 1
    If $x > $iW + $b Then $x = -$b
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH)
    WEnd

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

    Func _Exit()
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_BitmapDispose ($hScannerBitmap)
    _GDIPlus_BitmapDispose ($hBitmap)
    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_GraphicsDispose($hBackbuffer)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_Shutdown()
    Exit
    EndFunc

    [/autoit]

    Gruß,
    UEZ

  • Bälle die von Wänden und Gegenständen abprallen

    • UEZ
    • 15. März 2011 um 16:22

    Schaue dir doch mal die Physik Engine2 von Moritz1243 an!

    Gruß,
    UEZ

  • In Datei Werte suchen und ändern ( Hex Datei )

    • UEZ
    • 14. März 2011 um 23:43

    Vielleicht mein progandy sowas:

    Spoiler anzeigen
    [autoit]


    #include <FileConstants.au3>
    #include <Array.au3>

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

    $run = FileBinReplace("ap.txt", "3030", "7878") ;suche nach Hex 3030 und ersetze es mit Hex 7878 -> 00->xx
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $run = ' & $run & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

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

    Func FileBinReplace($filename, $search, $replace) ;coded by UEZ build 2011-03-15 ßeta
    If $filename = "" Then Return SetError(1, 0, 0)
    If Not FileExists($filename) Then Return SetError(2, 0, 0)
    If $search = "" Or $replace = "" Then Return SetError(3, 0, 0)
    Local $data
    If Mod(StringLen($search), 2) = 1 Then $search = "0" & $search
    If Mod(StringLen($replace), 2) = 1 Then $replace = "0" & $replace
    If StringLen($search) <> StringLen($replace) Then Return SetError(4, 0, 0)
    Local $aTokens = StringRegExp($search, ".{2}", 3)
    If Not IsArray($aTokens) Then Return SetError(5, 0, 0)
    Local $len = UBound($aTokens)
    Local $flen = FileGetSize($filename)
    If @error Or $flen = 0 Then Return SetError(6, 0, 0)
    Local $hFile = FileOpen($filename, 16 + 1)
    If @error Then Return SetError(7, 0, 0)
    Local $pos = 0, $i = 0, $old_pos = 0, $c = 0
    While $pos < $flen + 1
    $old_pos = $pos
    While $i < $len
    FileSetPos($hFile, $pos, $FILE_BEGIN)
    If "0x" & $aTokens[$i] <> FileRead($hFile, 1) Then ExitLoop
    $pos += 1
    $i += 1
    WEnd
    If $i = $len Then
    FileSetPos($hFile, $old_pos, $FILE_BEGIN)
    FileWrite($hFile, "0x" & $replace)
    $pos += $len - $i
    $c += 1
    Else
    $pos += 1
    EndIf
    $i = 0
    WEnd
    FileFlush($hFile)
    FileClose($hFile)
    Return SetError(0, 0, $c)
    EndFunc

    [/autoit]

    Keine Ahnung, ob das schneller oder besser ist - ist einfach nur ein Konzept Code.

    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™