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 Windows Screenshooter v1.84 Build 2019-08-18

    • UEZ
    • 6. September 2011 um 11:45

    Noch'n Update: jetzt mit Video Aufzeichnungsfunktion (AVI noch unkomprimiert) + Lineal Funktion zum Messen von Distanzen.

    Gruß,
    UEZ

  • AutoIt Windows Screenshooter v1.84 Build 2019-08-18

    • UEZ
    • 6. September 2011 um 11:45

    Noch'n Update: jetzt mit Video Aufzeichnungsfunktion (AVI noch unkomprimiert) + Lineal Funktion zum Messen von Distanzen.

    Gruß,
    UEZ

  • If Then Else: mehrzeilige Anweisung

    • UEZ
    • 30. August 2011 um 10:18

    Wenn dann eher so:

    [autoit]


    If $instr = $inval1 Then
    GUICtrlSetBkColor($inv1, 0x00a800)
    Run($pro1)
    EndIf

    [/autoit]

    Was soll der Text am Ende sein?

    Gruß,
    UEZ

  • ISO Creator v1.16 build 2012-09-11 beta

    • UEZ
    • 29. August 2011 um 14:40

    Hast recht, kommt wohl aus dem Englischen -> EXEs...

    Apropos Exen, die muss ich noch hochladen...

    Danke,
    UEZ

  • ISO Creator v1.16 build 2012-09-11 beta

    • UEZ
    • 29. August 2011 um 14:11

    Kleines Update!

    Gruß,
    UEZ

  • Buttons im GUIOnEvent-Mode ansprechen

    • UEZ
    • 27. August 2011 um 18:28

    Für den GUIOnEvent-Mode benötigst du Funktionen, die von den Buttons angesprochen werden, wenn sie betätigt werden.

    Beispiel:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>

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

    Opt("GUIOnEventMode", 1)

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

    Dim $buttons[11]

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

    GUICreate("Test", 100, 400)

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

    For $i = 1 To 10
    $buttons[$i] = GUICtrlCreateButton("Button " & $i, 10, 10 + $i * 30)
    GUICtrlSetOnEvent($buttons[$i], "B" & $i)
    Next

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

    GUISetState()

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "_beenden")

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

    While 1
    Sleep(10)
    WEnd

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

    Func B1()
    MsgBox(0, "Test", "Button1")
    EndFunc

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

    Func B2()
    MsgBox(0, "Test", "Button2")
    EndFunc

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

    Func B3()
    MsgBox(0, "Test", "Button3")
    EndFunc

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

    Func B4()
    MsgBox(0, "Test", "Button4")
    EndFunc

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

    Func B5()
    MsgBox(0, "Test", "Button5")
    EndFunc

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

    Func B6()
    MsgBox(0, "Test", "Button6")
    EndFunc

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

    Func B7()
    MsgBox(0, "Test", "Button7")
    EndFunc

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

    Func B8()
    MsgBox(0, "Test", "Button8")
    EndFunc

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

    Func B9()
    MsgBox(0, "Test", "Button9")
    EndFunc

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

    Func B10()
    MsgBox(0, "Test", "Button10")
    EndFunc

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

    Func _beenden()
    Exit
    EndFunc ;==>_beenden

    [/autoit]

    Dies war meine erste Idee, vielleicht gibt es elegantere Lösungen!

    Gruß,
    UEZ

  • Screenshot erstellen

    • UEZ
    • 23. August 2011 um 19:05

    andygo: das ist nicht das gleiche Freihandmarkieren! ;)

    Gruß,
    UEZ

  • Screenshot erstellen

    • UEZ
    • 22. August 2011 um 11:27

    Schaue mal hier rein: AutoIt Windows Screenshooter v1.29 Build 2011-08-16 Final

    Ich benutze keinerlei DLLs!

    Wenn ich Zeit finde, werde ich noch das Freihand Markieren des Desktop Bereiches implementieren.

    Gruß,
    UEZ

  • ColorConstantsEx - 400 klassische Farbbezeichnungen + Anzeigetool

    • UEZ
    • 21. August 2011 um 19:11

    Nette Idee mit den Farben!

    Danke und Gruß,
    UEZ

  • Bilder mit schwarzen Kreisen darstellen

    • UEZ
    • 18. August 2011 um 10:03

    Nette Idee! :thumbup:

    Übrigens: das nennt sich Halftone bzw. auf Deutsch Druckraster: -> http://de.wikipedia.org/wiki/Druckraster

    Appropos Halftone (lag bei mir so rum):

    Spoiler anzeigen
    [autoit]


    #AutoIt3Wrapper_Compile_both=y
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=y
    #AutoIt3Wrapper_UPX_Parameters=--brute --crp-ms=999999 --all-methods --all-filters
    #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
    #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>

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

    Opt("GuiOnEventMode", 1)

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

    Global Const $width = @DesktopWidth * 0.25
    Global Const $height = @DesktopHeight * 0.25
    Global Const $GUI_title = "GDI+ Halftone by UEZ 2011"
    Global Const $hGui = GUICreate($GUI_title, $width, $height)

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

    _GDIPlus_Startup()
    Global $hBMP = _WinAPI_CreateBitmap($width, $height)
    Global $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBMP)
    Global $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    Global $hDC = _WinAPI_GetDC($hGUI)
    Global $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC)
    Global $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBITMAP)
    Global $hGraphic = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer)
    Global Const $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000)
    Global Const $hBrush_Clear = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
    _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)
    GUISetState()

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

    Global $i, $t, $tt, $x, $y, $ii, $distx, $disty, $d, $r
    Global Const $SRCCOPY = 0x00CC0020
    Global Const $circles = 3
    Global $s = 16 ;spacing between dots
    Global $aCircles[$circles][5] ; x, y, dx, dy, m

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

    For $i = 0 To UBound($aCircles) - 1
    $aCircles[$i][0] = Random(0, 1) ;x -> x position
    $aCircles[$i][1] = Random(0, 1) ;y -> y position
    $aCircles[$i][2] = Random(0, 1) * 0.03 ;dx -> speed x vector
    $aCircles[$i][3] = Random(0, 1) * 0.03 ;dy -> speed y vector
    $aCircles[$i][4] = Random(0.08, 0.25) ;m -> mass
    Next

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

    GUISetOnEvent(-3, "_Exit")

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

    Global $fps = 0
    AdlibRegister("FPS", 1000)

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

    Do
    _WinAPI_BitBlt($hDC, 0, 0, $width, $height, $hDC_backbuffer, 0, 0, $SRCCOPY)
    ;~ $t = TimerInit()
    _GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $width, $height, $hBrush_Clear)
    For $i = 0 To $circles - 1 ;move mass centers
    $aCircles[$i][0] += $aCircles[$i][2]
    $aCircles[$i][1] += $aCircles[$i][3]
    If $aCircles[$i][0] > 1 Or $aCircles[$i][0] < 0 Then $aCircles[$i][2] *= -1
    If $aCircles[$i][1] > 1 Or $aCircles[$i][1] < 0 Then $aCircles[$i][3] *= -1
    Next
    For $x = 0 To $width Step $s
    For $y = 0 To $height Step $s
    $ii = 0.2 ;intensity in this dot
    For $i = 0 To $circles - 1 ;sum influence from all mass centers
    $distx = $x - $aCircles[$i][0] * $width ;x distance
    $disty = $y - $aCircles[$i][1] * $height ;y distance
    $d = Sqrt($distx * $distx + $disty * $disty) / ($height + $width) ;dance between current mass center and current dot
    If Not $d Then ;add influence from current mass center (but not too much!)
    $ii += 2
    Else
    $ii += Min($aCircles[$i][4] / ($d * $d * 20), 2)
    EndIf
    Next
    $r = Min($ii, $s) * $s * 0.70
    _GDIPlus_GraphicsFillEllipse($hGraphic, $x + 1, $y + 1, $r, $r, $hBrush)
    Next
    Next
    ;~ $tt = TimerDiff($t)
    ;~ If $tt < 24 Then ;if the time was too short, half the spacing between dots
    ;~ $s /= 2
    ;~ ElseIf $tt > 74 Then ;if the time was too long, increase spacing by 8 pixels
    ;~ $s += 8
    ;~ EndIf
    $fps += 1
    Until Not Sleep(30)

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

    Func FPS()
    WinSetTitle($hGui, "", $GUI_title & " / FPS: " & $fps)
    $fps = 0
    EndFunc ;==>FPS

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

    Func Min($a, $b)
    If $a < $b Then Return $a
    Return $b
    EndFunc ;==>Min

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

    Func _Exit()
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_BrushDispose($hBrush_Clear)
    _WinAPI_SelectObject($hDC_backbuffer, $DC_obj)
    _GDIPlus_GraphicsDispose($hGraphic)
    _WinAPI_DeleteObject($hBMP)
    _GDIPlus_BitmapDispose($hBitmap)
    _WinAPI_DeleteObject($hHBITMAP)
    _WinAPI_ReleaseDC($hGUI, $hDC)
    _GDIPlus_Shutdown()
    GUIDelete($hGui)
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    Gruß,
    UEZ

  • ImageUDF 1

    • UEZ
    • 16. August 2011 um 21:25

    Gefällt mir! Klasse Arbeit!

    Hast du einen Vergleichsbenchmark, wo man den Unterschied messen kann? Z.B. das Beispiel als pur GDI+.

    Gruß,
    UEZ

  • bmp 2 jpg konvertieren

    • UEZ
    • 15. August 2011 um 11:01

    eukalyptus: danke für den Benchmark! Wenn ich meine Funktion auf Speed optimieren würde, würde im Prinzip deine Version herauskommen!

    Die Unterschiede sind auch nicht so gravierend ausgefallen...

    Code
    Tool		ms		Speed
    FreeImage	6704,621956	100%
    GDIPlus		7424,867686	90,30%
    FreeImage New	7547,155295	88,84%
    UEZ		8915,102618	75,21%
    ImageMagick	9683,291871	69,24%


    Danke,
    UEZ

  • Listview: Item per Skript selektieren, Darstellung aber nicht grau - sondern, wie per Hand in blau

    • UEZ
    • 15. August 2011 um 10:47

    GUICtrlSetState($ListView1,$GUI_FOCUS) is eleganter als ControlClick("", "", $ListView1). ;)

    Gruß,
    UEZ

  • bmp 2 jpg konvertieren

    • UEZ
    • 15. August 2011 um 09:21

    Wie langsam war denn meine Funktion?

    Sie war nicht auf Geschwindigkeit optimiert!

    Gruß,
    UEZ

  • bmp 2 jpg konvertieren

    • UEZ
    • 14. August 2011 um 19:20

    Hier eine Funktion, um Bilder in JPGs umzuwandeln

    Spoiler anzeigen
    [autoit]


    #include-once
    #include <GDIPlus.au3>

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

    ; #FUNCTION# ======================================================================================
    ; Name ..........: Convert2JPG()
    ; Description ...: Converts any image to a JPG file
    ; Syntax ........: Convert2JPG($inFile, $outFile[, $scaleW = 1[, $scaleH = 1[, $jpgQuality = 90[, $interpolationMode = 7]]]])
    ; Parameters ....: $inFile - input file name - should be any image file except jpg
    ; $outFile - output filename
    ; $scaleW - [optional] any number from 0 to x to scale width factor. Default = 1 - no scale (default:1)
    ; $scaleH - [optional] (default:1)
    ; $jpgQuality - [optional] jpg quality settings: 0 - 100 whereas 100 is best quality (default:90)
    ; $interpolationMode - [optional] any number from 0-7 (default:7):
    ; 0 - Default interpolation mode
    ; 1 - Low-quality mode
    ; 2 - High-quality mode
    ; 3 - Bilinear interpolation. No prefiltering is done
    ; 4 - Bicubic interpolation. No prefiltering is done
    ; 5 - Nearest-neighbor interpolation
    ; 6 - High-quality, bilinear interpolation. Prefiltering is performed to ensure high-quality shrinking
    ; 7 - High-quality, bicubic interpolation. Prefiltering is performed to ensure high-quality shrinking
    ; Return values .: Success -> True
    ; Failure:
    ; 1 - either no input or output file is given
    ; 2 - scale factor width or height is incorrect
    ; 3 - jpg quality value is out of range (0-100)
    ; 4 - interpolation mode value is out of range (0-7)
    ; 5 - $scaleW or $scaleH or $jpgQuality or $interpolationMode values are not numbers
    ; 6 - bitmap could not be created
    ; 7 - scaled bitmap could not be created
    ; 8 - scaled bitmap could not be saved
    ; 9 - bitmap could not be created
    ; Author ........: UEZ 2011
    ; Version .......: v0.90 build 2011-08-14
    ; Modified ......:
    ; Remarks .......:
    ; Related .......: GDIPlus.au3
    ; =================================================================================================
    Func Convert2JPG($inFile, $outFile, $scaleW = 1, $scaleH = 1, $jpgQuality = 90, $interpolationMode = 7)
    If $inFile = "" Or $outFile = "" Then Return SetError(1, 0, 0)
    If $scaleW < 0 Or $scaleH < 0 Then Return SetError(2, 0, 0)
    If $jpgQuality < 0 Or $jpgQuality > 100 Then Return SetError(3, 0, 0)
    If $interpolationMode < 0 Or $interpolationMode > 7 Then Return SetError(4, 0, 0)
    If Not IsNumber($scaleW) Or Not IsNumber($scaleH) Or Not IsNumber($jpgQuality) Or Not IsNumber($interpolationMode) Then Return SetError(5, 0, 0)
    Local $declared = True
    If Not $ghGDIPDll Then
    _GDIPlus_Startup()
    $declared = False
    EndIf
    If StringRight($outFile, 4) <> ".jpg" Then $outFile &= ".jpg"
    Local Const $sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
    Local $tParams = _GDIPlus_ParamInit(1)
    Local $tData = DllStructCreate("int Quality")
    DllStructSetData($tData, "Quality", $jpgQuality)
    Local $pData = DllStructGetPtr($tData)
    _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData)
    Local Const $pParams = DllStructGetPtr($tParams)
    Local Const $hBitmap = _GDIPlus_BitmapCreateFromFile($inFile)
    If Not $hBitmap Then Return SetError(6, 0, 0)
    Local $iW = _GDIPlus_ImageGetWidth($hBitmap)
    Local $iH = _GDIPlus_ImageGetHeight($hBitmap)
    Local $save, $err = 0
    If $scaleW <> 1 Or $scaleH <> 1 Then
    Local Const $newW = $iW * $scaleW
    Local Const $newH = $iH * $scaleH
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $newW, "int", $newH, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0)
    If @error Then Return SetError(7, 0, 0)
    Local $hBmp_scaled = $aResult[6]
    Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBmp_scaled)
    DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hContext, "int", $interpolationMode)
    _GDIPlus_GraphicsDrawImageRect($hContext, $hBitmap, 0, 0, $newW, $newH)
    _GDIPlus_GraphicsDispose($hContext)
    $save = _GDIPlus_ImageSaveToFileEx($hBmp_scaled, $outFile, $sCLSID, $pParams)
    $tParams = 0
    $tData = 0
    If Not $save Then $err = 8
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_BitmapDispose($hBmp_scaled)
    If Not $declared Then _GDIPlus_Shutdown()
    If $err Then Return SetError($err, 0, 0)
    Return True
    EndIf
    $save = _GDIPlus_ImageSaveToFileEx($hBitmap, $outFile, $sCLSID, $pParams)
    $tParams = 0
    $tData = 0
    If Not $save Then $err = 9
    _GDIPlus_BitmapDispose($hBitmap)
    If Not $declared Then _GDIPlus_Shutdown()
    If $err Then Return SetError($err, 0, 0)
    Return True
    EndFunc

    [/autoit]

    Falls ihr Fehler findet, bitte melden!

    Gruß,
    UEZ

  • Bildpfad von Guictrlcreatepic() auslesen

    • UEZ
    • 14. August 2011 um 18:03

    Wenn du doch das Pic Control erstellst, solltest du doch wissen, welches Bild du genommen hast! Ich verstehe deine Frage nicht richtig!

    Gruß,
    UEZ

  • bmp 2 jpg konvertieren

    • UEZ
    • 14. August 2011 um 18:01

    GDI+ basiert auf eine DLL und das Umwandeln sollte auch mit GDI+ relativ fix gehen.

    Gruß,
    UEZ

  • AutoIt Windows Screenshooter v1.84 Build 2019-08-18

    • UEZ
    • 13. August 2011 um 12:14

    Update Ankündigung: jetzt mit der Möglichkeit das Bild in eine PDF Datei zu speichern! Einfach das Bild als Datei.pdf speichern.

    Danke an taietel für die super UDF!

    Gruß,
    UEZ

  • Office 2010 Installationsschlüssel auslesen

    • UEZ
    • 12. August 2011 um 14:36

    http://www.autoitscript.com/forum/topic/13…and-office-key/

    Gruß,
    UEZ

  • Prozentrechner

    • UEZ
    • 12. August 2011 um 14:14

    Teste mal dies:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2011
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    $hGUI = GUICreate("Prozentrechnung", 615, 277)
    $idLabelLogo = GUICtrlCreateLabel("Prozentrechnung", 16, 8, 583, 101)
    GUICtrlSetFont(-1, 64, 400, 0, "Times New Roman")
    $idLabelG = GUICtrlCreateLabel("Grundwert G=", 32, 136, 134, 28)
    GUICtrlSetFont(-1, 16, 400, 0, "Arial")
    GUICtrlSetTip(-1, "G=W/p*100")
    $idLabelW = GUICtrlCreateLabel("Prozentwert W=", 14, 176, 154, 28)
    GUICtrlSetFont(-1, 16, 400, 0, "Arial")
    GUICtrlSetTip(-1, "W=G*p/100")
    $idLabelp = GUICtrlCreateLabel("Prozentsatz p=", 25, 216, 142, 28)
    GUICtrlSetFont(-1, 16, 400, 0, "Arial")
    GUICtrlSetTip(-1, "p=W/G*100")
    $idGrundwert = GUICtrlCreateInput("0", 168, 136, 250, 26)
    GUICtrlSetFont(-1, 14, 400, 0, "Arial")
    $idProzentwert = GUICtrlCreateInput("0", 168, 174, 250, 26)
    GUICtrlSetFont(-1, 14, 400, 0, "Arial")
    $idProzentsatz = GUICtrlCreateInput("0", 168, 213, 250, 26)
    GUICtrlSetFont(-1, 14, 400, 0, "Arial")
    $idExit = GUICtrlCreateButton("Exit", 545, 209, 50, 32)
    GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
    $idCalcG = GUICtrlCreateButton("Calc G", 425, 136, 75, 26)
    GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
    $idCalcW = GUICtrlCreateButton("Calc W", 425, 176, 75, 26)
    GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
    $idCalcp = GUICtrlCreateButton("Calc p", 425, 216, 75, 26)
    GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
    GUISetState(@SW_SHOW)

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

    GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE, $idExit
    GUIDelete($hGUI)
    Exit
    Case $idCalcG
    Calculate("G")
    Case $idCalcW
    Calculate("W")
    Case $idCalcp
    Calculate("p")
    EndSwitch
    WEnd

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

    Func Calculate($prozent)
    Local $G = GUICtrlRead($idGrundwert)
    Local $W = GUICtrlRead($idProzentwert)
    Local $p = GUICtrlRead($idProzentsatz)
    Switch $prozent
    Case "G"
    If $p = 0 Then Return MsgBox(16, "Error", "p = 0")
    GUICtrlSetData($idGrundwert, Round($W / $p * 100, 2)) ;G=W/p*100
    Case "W"
    GUICtrlSetData($idProzentwert, Round($G * $p / 100, 2)) ;W=G*p/100
    Case "p"
    If $G = 0 Then Return MsgBox(16, "Error", "G = 0")
    GUICtrlSetData($idProzentsatz, Round($W / $g * 100, 2)) ;p=W/G*100
    EndSwitch
    EndFunc

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

    Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
    Local $control_id = BitAND($wParam, 0x0000FFFF)
    Switch $control_id
    Case $idGrundwert
    GUICtrlSetData($idGrundwert, CheckInput($idGrundwert))
    Case $idProzentwert
    GUICtrlSetData($idProzentwert, CheckInput($idProzentwert))
    Case $idProzentsatz
    GUICtrlSetData($idProzentsatz, CheckInput($idProzentsatz))
    EndSwitch
    Return "GUI_RUNDEFMSG"
    EndFunc

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

    Func CheckInput($control_id)
    Local $number = StringRegExpReplace(GUICtrlRead($control_id), "[^0-9.]", "")
    StringReplace($number, ".", ".")
    If @extended > 1 Then $number = StringLeft($number, StringInStr($number, ".", 0, 2) - 1)
    Return $number
    EndFunc

    [/autoit]

    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™