Text mit Bild Ineinanderkopieren und GUI als Bild speichern

  • Hallo,

    ich möchte mir einen Signatur creator erstellen und habe erstmal irgendein hässliches Bild gemacht, um es zu testen.

    Jedoch zieht das Weiße bei der Schrift total bescheuert aus und wie bekomme ich es hin, daß die GUI mit den Labels als Bild abgespeichert wird?

    Script und Bild sind im Anhang.

    Danke im voraus.

  • Probiere es mal damit:

    Spoiler anzeigen
    [autoit]


    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.6.1
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <ScreenCapture.au3>
    #include <WindowsConstants.au3>
    $Form1 = GUICreate("Form1", 503, 445, 192, 124)
    $Name = GUICtrlCreateLabel("Name", 24, 312, 32, 17)
    $Input1 = GUICtrlCreateInput("Input1", 72, 312, 121, 21)
    $Level = GUICtrlCreateLabel("Level", 312, 312, 30, 17)
    $Input2 = GUICtrlCreateInput("Input2", 352, 312, 129, 21)
    $Ok = GUICtrlCreateButton("Ok", 216, 352, 75, 25, $WS_GROUP)
    $Bild = GUICtrlCreateButton("Bild", 72, 408, 99, 25, $WS_GROUP)
    $Beenden = GUICtrlCreateButton("Beenden", 368, 408, 75, 25, $WS_GROUP)
    $Pic1 = GUICtrlCreatePic("sig.jpg", 0, 0, 500, 300, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Ok
    GUICtrlCreateLabel(GUICtrlRead($Input1), 256, 32, 234, 46)
    GUICtrlSetBkColor(-1, -2)
    GUICtrlCreateLabel(GUICtrlRead($Input2), 232, 184, 252, 43)
    GUICtrlSetBkColor(-1, -2)
    Case $Bild
    GUISetState(@SW_HIDE)
    $Form1_1 = GUICreate("Form1", 503, 301, 192, 124)
    $Pic1 = GUICtrlCreatePic("sig.jpg", 0, 0, 500, 300, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    $Label1 = GUICtrlCreateLabel(GUICtrlRead($Input1), 256, 32, 82, 46)
    GUICtrlSetBkColor(-1, -2)
    $eeee = GUICtrlCreateLabel(GUICtrlRead($Input2), 232, 184, 52, 43)
    GUICtrlSetBkColor(-1, -2)
    GUISetState(@SW_SHOW)
    _ScreenCapture_CaptureWnd(@ScriptDir & "\Screenshot.jpg", $Form1_1, 0, 0, -1, -1, False)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd
    EndSwitch
    WEnd

    [/autoit]

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯