GDI+ schrift auf bild ^^

  • Spoiler anzeigen
    [autoit]

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

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

    AutoIt Version: 3.3.0.0
    Author: Kev

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <IE.au3>
    #include <Inet.au3>
    #include <String.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include <GuiComboBox.au3>
    #include <array.au3>
    #include <file.au3>
    #Include <GDIPlus.au3>
    #include <Color.au3>
    #include <WinAPI.au3>
    #include <ScreenCapture.au3>

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

    global $pic1

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

    $arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
    $Form1 = Guicreate("Rising Gods Signaturius",680,400)
    $shape = GUICtrlCreateInput(' ', 480, 0, 5, 400)
    GUICtrlSetBkColor(-1,"0x000000")
    Guictrlsetstate(-1,$GUI_DISABLE)
    GuictrlcreateLabel("Character Name:",30,30,120,25)
    $Name = GUICtrlCreateInput("Dein Charactername",130,25,120,25)
    $arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
    GuictrlcreateLabel("Wähle deine Signatur:",265,30,120,25)
    GuictrlcreateLabel("Rising Gods Realm:",30,60,120,25)
    $Realm = GUICtrlCreateInput("PvE oder PvP",130,55,120,25)
    $Button = GUICtrlCreateButton("Fertig",130,85,120,25)
    $ButtonExit = GUICtrlCreateButton("Beenden",550,370,120,25)
    $Button1 = GUICtrlCreateButton("Überprüfung",130,112,120,25)
    $UpdateButton = GuictrlcreateButton("Update",550,345,120,25)
    $SigOK = GuictrlcreateButton("Erstellen",260,85,120,25)
    $SigEN = GuictrlcreateButton("Ändern",260,112,120,25)
    $Save = GuictrlcreateButton("Signatur speichern",180,165,140,70)
    GuiCtrlSetState($SigEN,$GUI_DISABLE)
    GuictrlcreateLabel("Character:",500,25,120,25)
    GuictrlcreateLabel("Fraktion:",500,55,120,25)
    GuictrlcreateLabel("Klasse:",500,85,120,25)
    GuictrlcreateLabel("Level:",500,115,120,25)
    GuictrlcreateLabel("Rasse:",500,145,120,25)
    GuictrlcreateLabel("Skillung:",500,175,120,25)
    GuictrlcreateLabel("Gesundheit:",500,205,120,25)
    GuictrlcreateLabel("Mana/Wut/Energie:",500,235,120,25)
    GuictrlcreateLabel("Gilde:",500,265,120,25)
    GuictrlcreateLabel("Erfolgspunkte:",500,295,120,25)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth",150,379,180,90)
    Guictrlsetstate(-1,$GUI_DISABLE)
    $charklasse = GuictrlcreateLabel("",600,85,120,25)
    $charfraktion = GuictrlcreateLabel("",600,55,120,25)
    $charname = GuictrlcreateLabel("",600,25,120,25)
    $lvl = GuictrlcreateLabel("",600,115,120,25)
    $Rasse = GuictrlcreateLabel("",600,145,120,25)
    $Skill = GuictrlcreateLabel("",600,175,120,25)
    $Gesund = GuictrlcreateLabel("",600,205,120,25)
    $Mana = GuictrlcreateLabel("",600,235,120,25)
    $guild = GuictrlcreateLabel("",600,265,120,25)
    $erfolge = GuictrlcreateLabel("",600,295,120,25)
    $Pic1 = GuiCtrlCreatePic("",15,265,450,100,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Combo1 = Guictrlcreatecombo("",260,55,120,35)
    GuiCtrlSetState($Button1, $GUI_DISABLE)
    GUISetState(@SW_SHOW)

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

    For $i = 1 To UBound ($arfile) - 1
    _GUICtrlComboBox_AddString ($Combo1, $arfile [$i])
    Next
    _GUICtrlComboBox_SetCurSel ($Combo1, 0)
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [1])
    $value = GUICtrlRead ($Combo1)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $button
    GuiCtrlSetState($Name, $GUI_DISABLE)
    GuiCtrlSetState($Realm, $GUI_DISABLE)
    msgbox(0,"Status", "Character wird abgerufen...")
    GuiCtrlSetState($Button1, $GUI_ENABLE)
    $source = _INetGetSource("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    $klasse = _StringBetween($source, '" class="', '" classId')
    If IsArray($klasse) Then GUICtrlSetData($charklasse, $klasse[0])
    $faction = _StringBetween($source , '" faction="', '" factionId')
    If IsArray($faction) Then GUICtrlSetData($charfraktion, $faction[0])
    $name2 = _StringBetween($source , '" name="', '" points')
    If IsArray($name2) Then GUICtrlSetData($charname, $name2[0])
    $name3 = _StringBetween($source , '" level="', '" name')
    If IsArray($name3) Then GUICtrlSetData($lvl, $name3[0])
    $name4 = _StringBetween($source , '" race="', '" raceId')
    If IsArray($name4) Then GUICtrlSetData($Rasse, $name4[0])
    $name5 = _StringBetween($source , '" prim="', '" treeOne')
    If IsArray($name5) Then GUICtrlSetData($Skill, $name5[0])
    $name6 = _StringBetween($source , '<health effective="', '"/>')
    If IsArray($name6) Then GUICtrlSetData($Gesund, $name6[0])
    $name7 = _StringBetween($source , '" effective="', '" notCasting')
    If IsArray($name7) Then GUICtrlSetData($Mana, $name7[0])
    $name8 = _StringBetween($source , '" guildName="', '" guildUrl')
    If IsArray($name8) Then GUICtrlSetData($guild, $name8[0])
    $name9 = _StringBetween($source , '" points="', '" total')
    If IsArray($name9) Then GUICtrlSetData($erfolge, $name9[0])
    case $ButtonExit
    exit
    case $UpdateButton
    msgbox(1,"Updater","Nach neuen Updates suchen?")
    sleep(1000)
    if FileExists (@ScriptDir & "\rg_bg\RG_SigU_01.gif") Then
    Msgbox(1,"Updater","Keine neuen Updates vorhanden")
    else
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_01.gif",@scriptdir & "\rg_bg\RG_SigU_01.gif",1)
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_02.gif",@scriptdir & "\rg_bg\RG_SigU_02.gif",1)
    sleep(1000)
    msgbox(0,"Updater","Update erfolgreich")
    Endif
    case $SigOK
    GuiCtrlSetState($Combo1,$GUI_DISABLE)
    GuiCtrlSetState($SigEN,$GUI_ENABLE)
    msgbox(0,"Signatur","Signatur erfolgreich ausgewählt")
    _Main()
    case $SigEN
    GuiCtrlSetState($Combo1,$GUI_ENABLE)
    case $save
    $pic1 = FileSaveDialog("Speichern",@ScriptDir, "JPEG(*.jpg;*.jpeg)|24-Bit-Bitmap(*.bmp)|GIF(*.gif)", 2)
    case $Button1
    ShellExecute("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    EndSwitch
    If $value <> GUICtrlRead ($Combo1) Then
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [_ArraySearch ($arfile, GUICtrlRead ($Combo1))])
    $value = GUICtrlRead ($Combo1)
    EndIf
    sleep (50)
    WEnd

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

    _Main()

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

    Func _Main()
    Local $hGUI, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Zeichnet einen String
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($pic1)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(140, 110, 100, 20)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, "test", $hFont, $tLayout, $hFormat, $hBrush)

    ; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    ; Ressourcen freigeben
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

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

    EndFunc ;==>_Main

    [/autoit]

    Hey..ich will das des wort "test" auf mein $pic bild geschrieben wird aber iwie... ?( passiert da 0
    jemand ne ahnung wie ich das machen kann?

    Gruß

    Kev

  • Die sieht irgendwie nach nem Bot aus und die werden hier glaub ich net unterstützt

  • dasn signatur ersteller der daten aus nem arsenal ausließt und das dann aufn bild klatscht, so das die eigenschaften vom character aufs bild gepackt werden?
    wollen wir 2 jetz noch diskutieren oder? wie?

    bzw soll ichn gui machen mit 3 buttons auf die schreib ich:

    Charaktername
    Gilde
    PvP/PvE

    un dann isses au n bot?

  • @denno:
    nich alles bei dem gilde pvp oder ähnliches drinsteht ist ein bot ;)

    @all:
    kenne das problem von kev von pm's und ähnlichem.
    es handelt sich 100% um keinen bot. darf also supportet werden ;)

  • Hallo kev,

    da das Skript ohne die Pics aussteigt, hier noch einmal das Skript von vorhin (ergänzt um den Text):

    Spoiler anzeigen
    [autoit]

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

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

    AutoIt Version: 3.3.0.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <WinAPI.au3>
    #include <GDIPlus.au3>

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

    Global $hGraphic, $hBrush, $hFormat, $hFamily, $hFont

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

    #cs
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_01.gif",@scriptdir &"\rg_bg\RG_Sig_01.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_02.gif",@scriptdir &"\rg_bg\RG_Sig_02.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_03.gif",@scriptdir &"\rg_bg\RG_Sig_03.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_04.gif",@scriptdir &"\rg_bg\RG_Sig_04.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_05.gif",@scriptdir &"\rg_bg\RG_Sig_05.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_06.gif",@scriptdir &"\rg_bg\RG_Sig_06.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_07.gif",@scriptdir &"\rg_bg\RG_Sig_07.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_08.gif",@scriptdir &"\rg_bg\RG_Sig_08.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_09.gif",@scriptdir &"\rg_bg\RG_Sig_09.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_10.gif",@scriptdir &"\rg_bg\RG_Sig_10.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_11.gif",@scriptdir &"\rg_bg\RG_Sig_11.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_12.gif",@scriptdir &"\rg_bg\RG_Sig_12.gif")
    #ce

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

    Global $suchen
    Global $progress1
    Global $fertig
    Global $ab

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

    $gui1 = GUICreate("Rising Gods Installer", 500, 299)
    GUICtrlCreateLabel("Willkommen bei dem Installations-Assistenten für" & @CRLF & " » Rising Signatur «", 35, 30, 500, 200)
    GUICtrlSetFont(-1, 15)
    GUICtrlSetState(-2, $GUI_DISABLE)
    GUICtrlCreateLabel("Dieser Assistent wird sie durch die Installation von » Rising Signatur « begleiten.", 80, 100, 400, 50)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth", 165, 280, 180, 90)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Button1 = GUICtrlCreateButton("Weiter >", 130, 240, 120, 25)
    $Button2 = GUICtrlCreateButton("Abbrechen", 255, 240, 120, 25)
    $pic = GUICreate("", 68, 71, 5, 50, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui1)
    GUICtrlCreatePic("..\GUI\merlin.gif", 0, 0, 0, 0)
    GUISetState(@SW_SHOW, $pic)
    GUISetState(@SW_SHOW, $gui1)

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

    While 1
    _gdiText($gui1,"Test")
    $nmsg = GUIGetMsg()
    Switch $nmsg
    Case $GUI_EVENT_CLOSE
    _gdiEnd()
    Exit
    Case $Button2
    _gdiEnd()
    Exit
    Case $Button1
    ExitLoop

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

    EndSwitch
    WEnd
    _gdiEnd()

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

    $gui2 = GUICreate("Rising Gods Installer Zielverzeichnis", 500, 299)
    GUICtrlCreateLabel("Zielverzeichnis auswählen", 35, 30, 500, 200)
    GUICtrlSetFont(-1, 15)
    GUICtrlSetState(-2, $GUI_DISABLE)
    GUICtrlCreateLabel("Rising Signatur wird in das unten angegebene Verzeichnis installiert. Falls Sie in ein anderes Verzeichnis installieren möchten, klicken Sie auf Durchsuchen und wählen Sie ein anderes Verzeichnis aus. Klicken Sie auf Weiter, um fortzufahren", 80, 65, 300, 80)
    GUICtrlCreateLabel("Der Ordner für dieses Programm wird extra angelegt.", 40, 140, 400, 50)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth", 165, 280, 180, 90)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $folder = GUICtrlCreateInput("C:/Programme/", 45, 175, 250, 25)
    $suchen = GUICtrlCreateButton("Durchsuchen...", 320, 175, 120, 25)
    $install = GUICtrlCreateButton("Installieren", 130, 240, 120, 25)
    $Button2 = GUICtrlCreateButton("Abbrechen", 255, 240, 120, 25)
    GUIDelete($gui1)
    $pic = GUICreate("", 68, 71, 5, 50, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui2)
    GUICtrlCreatePic("..\GUI\merlin.gif", 0, 0, 0, 0)

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

    GUISetState(@SW_SHOW, $pic)
    GUISetState(@SW_SHOW, $gui2)

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

    While 1
    $nmsg = GUIGetMsg()
    Switch $nmsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button2
    Exit
    Case $install
    $temp = GUICtrlRead($folder)
    gui()
    copy()
    Case $suchen
    $input = FileSelectFolder("test", "test")
    GUICtrlSetData($folder, $input)
    EndSwitch
    WEnd

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

    Func gui()
    $gui3 = GUICreate("Rising Gods Installer Installation", 500, 299)
    GUICtrlCreateLabel("Installation", 35, 30, 500, 200)
    GUICtrlSetFont(-1, 15)
    GUICtrlSetState(-2, $GUI_DISABLE)
    GUICtrlCreateLabel("Installation wird durchgeführt...bitte warten...", 40, 80, 400, 50)
    GUICtrlCreateLabel("Dateien werden kopiert...", 40, 115, 400, 50)
    $progress1 = GUICtrlCreateProgress(40, 180, 400, 12)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth", 165, 280, 180, 90)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $fertig = GUICtrlCreateButton("Fertig stellen", 130, 240, 120, 25)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $ab = GUICtrlCreateButton("Abbrechen", 255, 240, 120, 25)
    GUIDelete($gui2)
    $pic = GUICreate("", 68, 71, 235, 50, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui3)
    GUICtrlCreatePic("..\GUI\merlin.gif", 0, 0, 0, 0)

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

    GUISetState(@SW_SHOW, $pic)
    GUISetState(@SW_SHOW, $gui3)
    EndFunc ;==>gui

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

    Func copy()
    DirCreate($temp & "\RisingSignature\rg_bg\")
    Sleep(500)
    For $i = 1 To 12
    If $i < 10 Then
    FileCopy(@ScriptDir & "/rg_bg/RG_Sig_0" & $i & ".gif", $temp & "/RisingSignature/rg_bg/RG_Sig_0" & $i & ".gif")
    Else
    FileCopy(@ScriptDir & "/rg_bg/RG_Sig_" & $i & ".gif", $temp & "/RisingSignature/rg_bg/RG_Sig_" & $i & ".gif")
    EndIf
    GUICtrlSetData($progress1, ($i * 100) / 12)
    Next
    MsgBox(0, "Status", "Rising Signatur wurde erfolgreich installiert")
    GUICtrlSetState($fertig, $GUI_ENABLE)

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

    While 1
    $nmsg = GUIGetMsg()
    Switch $nmsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $fertig
    Exit
    Case $ab
    Exit
    EndSwitch
    WEnd

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

    EndFunc ;==>copy

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

    func _gdiText($hGui,$sText)
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(140, 140, 100, 20)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _gdiEnd()
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]

    viel Spass damit,

    mfg (Auto)Bert

  • hier hoffe das hilft dir weiter:

    [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>

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

    Local $hGUI, $hWnd, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
    Local $sString = "Test", $aInfo

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

    $hGUI = GUICreate("Für AutoIt Kev", 400, 300)
    $hWnd = WinGetHandle("Für AutoIt Kev")
    GUICtrlCreatePic(@ScriptDir & '\pic.jpg', 0, 0, 400, 300)

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

    GUISetState()

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

    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hBrush = _GDIPlus_BrushCreateSolid(0xFF00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(140, 120, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $sString, $hFont, $aInfo[0], $hFormat, $hBrush)

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

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    ; Ressourcen freigeben
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

    [/autoit]


    Oups hatte nicht gesehen das AutoBert schon was gepostet hatte ...

  • Hallo Ahnungslos,

    da hast du leider recht, aber wenn ich _gdiText direkt nach GuiSetState aufrufe, verschwindet der Text, sobald das Fenster einmal von einem anderen überlagert wird oder man es kurz aus dem Desktop schiebt und wieder zurückholt. (Bei @denno passiert das auch),

    mfg (Auto)Bert

  • Es darf nur die _GDIPlus_GraphicsDrawStringEx Funktion in der Schleife stehen, der Rest müsste davor aufgerufen werden.

    Spoiler anzeigen
    [autoit]


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

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

    AutoIt Version: 3.3.0.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <WinAPI.au3>
    #include <GDIPlus.au3>

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

    Global $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    #cs
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_01.gif",@scriptdir &"\rg_bg\RG_Sig_01.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_02.gif",@scriptdir &"\rg_bg\RG_Sig_02.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_03.gif",@scriptdir &"\rg_bg\RG_Sig_03.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_04.gif",@scriptdir &"\rg_bg\RG_Sig_04.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_05.gif",@scriptdir &"\rg_bg\RG_Sig_05.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_06.gif",@scriptdir &"\rg_bg\RG_Sig_06.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_07.gif",@scriptdir &"\rg_bg\RG_Sig_07.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_08.gif",@scriptdir &"\rg_bg\RG_Sig_08.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_09.gif",@scriptdir &"\rg_bg\RG_Sig_09.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_10.gif",@scriptdir &"\rg_bg\RG_Sig_10.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_11.gif",@scriptdir &"\rg_bg\RG_Sig_11.gif")
    fileInstall("C:\Dokumente und Einstellungen\Kev\Desktop\sa\rg_bg\RG_Sig_12.gif",@scriptdir &"\rg_bg\RG_Sig_12.gif")
    #ce

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

    Global $suchen
    Global $progress1
    Global $fertig
    Global $ab

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

    $gui1 = GUICreate("Rising Gods Installer", 500, 299)
    GUICtrlCreateLabel("Willkommen bei dem Installations-Assistenten für" & @CRLF & " » Rising Signatur «", 35, 30, 500, 200)
    GUICtrlSetFont(-1, 15)
    GUICtrlSetState(-2, $GUI_DISABLE)
    GUICtrlCreateLabel("Dieser Assistent wird sie durch die Installation von » Rising Signatur « begleiten.", 80, 100, 400, 50)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth", 165, 280, 180, 90)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $Button1 = GUICtrlCreateButton("Weiter >", 130, 240, 120, 25)
    $Button2 = GUICtrlCreateButton("Abbrechen", 255, 240, 120, 25)
    $pic = GUICreate("", 68, 71, 5, 50, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui1)
    GUICtrlCreatePic("..\GUI\merlin.gif", 0, 0, 0, 0)
    GUISetState(@SW_SHOW, $pic)
    GUISetState(@SW_SHOW, $gui1)

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

    _gdiStart($gui1)
    While 1
    _gdiText("Test")
    $nmsg = GUIGetMsg()
    Switch $nmsg
    Case $GUI_EVENT_CLOSE
    _gdiEnd()
    Exit
    Case $Button2
    _gdiEnd()
    Exit
    Case $Button1
    ExitLoop

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

    EndSwitch
    WEnd
    _gdiEnd()

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

    $gui2 = GUICreate("Rising Gods Installer Zielverzeichnis", 500, 299)
    GUICtrlCreateLabel("Zielverzeichnis auswählen", 35, 30, 500, 200)
    GUICtrlSetFont(-1, 15)
    GUICtrlSetState(-2, $GUI_DISABLE)
    GUICtrlCreateLabel("Rising Signatur wird in das unten angegebene Verzeichnis installiert. Falls Sie in ein anderes Verzeichnis installieren möchten, klicken Sie auf Durchsuchen und wählen Sie ein anderes Verzeichnis aus. Klicken Sie auf Weiter, um fortzufahren", 80, 65, 300, 80)
    GUICtrlCreateLabel("Der Ordner für dieses Programm wird extra angelegt.", 40, 140, 400, 50)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth", 165, 280, 180, 90)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $folder = GUICtrlCreateInput("C:/Programme/", 45, 175, 250, 25)
    $suchen = GUICtrlCreateButton("Durchsuchen...", 320, 175, 120, 25)
    $install = GUICtrlCreateButton("Installieren", 130, 240, 120, 25)
    $Button2 = GUICtrlCreateButton("Abbrechen", 255, 240, 120, 25)
    GUIDelete($gui1)
    $pic = GUICreate("", 68, 71, 5, 50, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui2)
    GUICtrlCreatePic("..\GUI\merlin.gif", 0, 0, 0, 0)

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

    GUISetState(@SW_SHOW, $pic)
    GUISetState(@SW_SHOW, $gui2)

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

    While 1
    $nmsg = GUIGetMsg()
    Switch $nmsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button2
    Exit
    Case $install
    $temp = GUICtrlRead($folder)
    gui()
    copy()
    Case $suchen
    $input = FileSelectFolder("test", "test")
    GUICtrlSetData($folder, $input)
    EndSwitch
    WEnd

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

    Func gui()
    $gui3 = GUICreate("Rising Gods Installer Installation", 500, 299)
    GUICtrlCreateLabel("Installation", 35, 30, 500, 200)
    GUICtrlSetFont(-1, 15)
    GUICtrlSetState(-2, $GUI_DISABLE)
    GUICtrlCreateLabel("Installation wird durchgeführt...bitte warten...", 40, 80, 400, 50)
    GUICtrlCreateLabel("Dateien werden kopiert...", 40, 115, 400, 50)
    $progress1 = GUICtrlCreateProgress(40, 180, 400, 12)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth", 165, 280, 180, 90)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $fertig = GUICtrlCreateButton("Fertig stellen", 130, 240, 120, 25)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $ab = GUICtrlCreateButton("Abbrechen", 255, 240, 120, 25)
    GUIDelete($gui2)
    $pic = GUICreate("", 68, 71, 235, 50, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui3)
    GUICtrlCreatePic("..\GUI\merlin.gif", 0, 0, 0, 0)

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

    GUISetState(@SW_SHOW, $pic)
    GUISetState(@SW_SHOW, $gui3)
    EndFunc ;==>gui

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

    Func copy()
    DirCreate($temp & "\RisingSignature\rg_bg\")
    Sleep(500)
    For $i = 1 To 12
    If $i < 10 Then
    FileCopy(@ScriptDir & "/rg_bg/RG_Sig_0" & $i & ".gif", $temp & "/RisingSignature/rg_bg/RG_Sig_0" & $i & ".gif")
    Else
    FileCopy(@ScriptDir & "/rg_bg/RG_Sig_" & $i & ".gif", $temp & "/RisingSignature/rg_bg/RG_Sig_" & $i & ".gif")
    EndIf
    GUICtrlSetData($progress1, ($i * 100) / 12)
    Next
    MsgBox(0, "Status", "Rising Signatur wurde erfolgreich installiert")
    GUICtrlSetState($fertig, $GUI_ENABLE)

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

    While 1
    $nmsg = GUIGetMsg()
    Switch $nmsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $fertig
    Exit
    Case $ab
    Exit
    EndSwitch
    WEnd

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

    EndFunc ;==>copy

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

    Func _gdiStart($hGui)
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(140, 140, 100, 20)
    EndFunc

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

    func _gdiText($sText)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _gdiEnd()
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]
  • kannste mir des au hierein:

    Spoiler anzeigen
    [autoit]

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

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

    AutoIt Version: 3.3.0.0
    Author: Kev

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    , '" points')
    If , '" guildUrl')
    If IsArray($name8) Then GUICtrlSetData($guild, $name8[0])
    $name9 = _StringBetween($source , '" points="', '" total')
    If IsArray($name9) Then GUICtrlSetData($erfolge, $name9[0])
    case $ButtonExit
    exit
    case $UpdateButton
    msgbox(1,"Updater","Nach neuen Updates suchen?")
    sleep(1000)
    if FileExists (@ScriptDir & "\rg_bg\RG_SigU_01.gif") Then
    Msgbox(1,"Updater","Keine neuen Updates vorhanden")
    else
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_01.gif",@scriptdir & "\rg_bg\RG_SigU_01.gif",1)
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_02.gif",@scriptdir & "\rg_bg\RG_SigU_02.gif",1)
    sleep(1000)
    msgbox(0,"Updater","Update erfolgreich")
    Endif
    case $SigOK
    GuiCtrlSetState($Combo1,$GUI_DISABLE)
    GuiCtrlSetState($SigEN,$GUI_ENABLE)
    msgbox(0,"Signatur","Signatur erfolgreich ausgewählt")
    _Main()
    case $SigEN
    GuiCtrlSetState($Combo1,$GUI_ENABLE)
    case $save
    $pic1 = FileSaveDialog("Speichern",@ScriptDir, "JPEG(*.jpg;*.jpeg)|24-Bit-Bitmap(*.bmp)|GIF(*.gif)", 2)
    case $Button1
    ShellExecute("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    EndSwitch
    If $value <> GUICtrlRead ($Combo1) Then
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [_ArraySearch ($arfile, GUICtrlRead ($Combo1))])
    $value = GUICtrlRead ($Combo1)
    EndIf
    sleep (50)
    WEnd

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

    _Main()

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

    Func _Main()
    Local $hGUI, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Zeichnet einen String
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($pic1)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(140, 110, 100, 20)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, "test", $hFont, $tLayout, $hFormat, $hBrush)

    ; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    ; Ressourcen freigeben
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

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

    EndFunc ;==>_Main

    [/autoit]

    bin grad iwie zu doof ^^

  • So, oder so ähnlich:

    Spoiler anzeigen
    [autoit]


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

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

    AutoIt Version: 3.3.0.0
    Author: Kev

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <IE.au3>
    #include <Inet.au3>
    #include <String.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include <GuiComboBox.au3>
    #include <array.au3>
    #include <file.au3>
    #Include <GDIPlus.au3>
    #include <Color.au3>
    #include <WinAPI.au3>
    #include <ScreenCapture.au3>

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

    global $pic1, $draw = 0
    Global $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    $arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
    $Form1 = Guicreate("Rising Gods Signaturius",680,400)
    $shape = GUICtrlCreateInput(' ', 480, 0, 5, 400)
    GUICtrlSetBkColor(-1,"0x000000")
    Guictrlsetstate(-1,$GUI_DISABLE)
    GuictrlcreateLabel("Character Name:",30,30,120,25)
    $Name = GUICtrlCreateInput("Dein Charactername",130,25,120,25)
    $arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
    GuictrlcreateLabel("Wähle deine Signatur:",265,30,120,25)
    GuictrlcreateLabel("Rising Gods Realm:",30,60,120,25)
    $Realm = GUICtrlCreateInput("PvE oder PvP",130,55,120,25)
    $Button = GUICtrlCreateButton("Fertig",130,85,120,25)
    $ButtonExit = GUICtrlCreateButton("Beenden",550,370,120,25)
    $Button1 = GUICtrlCreateButton("Überprüfung",130,112,120,25)
    $UpdateButton = GuictrlcreateButton("Update",550,345,120,25)
    $SigOK = GuictrlcreateButton("Erstellen",260,85,120,25)
    $SigEN = GuictrlcreateButton("Ändern",260,112,120,25)
    $Save = GuictrlcreateButton("Signatur speichern",180,165,140,70)
    GuiCtrlSetState($SigEN,$GUI_DISABLE)
    GuictrlcreateLabel("Character:",500,25,120,25)
    GuictrlcreateLabel("Fraktion:",500,55,120,25)
    GuictrlcreateLabel("Klasse:",500,85,120,25)
    GuictrlcreateLabel("Level:",500,115,120,25)
    GuictrlcreateLabel("Rasse:",500,145,120,25)
    GuictrlcreateLabel("Skillung:",500,175,120,25)
    GuictrlcreateLabel("Gesundheit:",500,205,120,25)
    GuictrlcreateLabel("Mana/Wut/Energie:",500,235,120,25)
    GuictrlcreateLabel("Gilde:",500,265,120,25)
    GuictrlcreateLabel("Erfolgspunkte:",500,295,120,25)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth",150,379,180,90)
    Guictrlsetstate(-1,$GUI_DISABLE)
    $charklasse = GuictrlcreateLabel("",600,85,120,25)
    $charfraktion = GuictrlcreateLabel("",600,55,120,25)
    $charname = GuictrlcreateLabel("",600,25,120,25)
    $lvl = GuictrlcreateLabel("",600,115,120,25)
    $Rasse = GuictrlcreateLabel("",600,145,120,25)
    $Skill = GuictrlcreateLabel("",600,175,120,25)
    $Gesund = GuictrlcreateLabel("",600,205,120,25)
    $Mana = GuictrlcreateLabel("",600,235,120,25)
    $guild = GuictrlcreateLabel("",600,265,120,25)
    $erfolge = GuictrlcreateLabel("",600,295,120,25)
    $Pic1 = GuiCtrlCreatePic("",15,265,450,100,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Combo1 = Guictrlcreatecombo("",260,55,120,35)
    GuiCtrlSetState($Button1, $GUI_DISABLE)
    GUISetState(@SW_SHOW)

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

    For $i = 1 To UBound ($arfile) - 1
    _GUICtrlComboBox_AddString ($Combo1, $arfile [$i])
    Next
    _GUICtrlComboBox_SetCurSel ($Combo1, 0)
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [1])
    $value = GUICtrlRead ($Combo1)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _gdiEnd()
    Exit
    case $button
    GuiCtrlSetState($Name, $GUI_DISABLE)
    GuiCtrlSetState($Realm, $GUI_DISABLE)
    msgbox(0,"Status", "Character wird abgerufen...")
    GuiCtrlSetState($Button1, $GUI_ENABLE)
    $source = _INetGetSource("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    $klasse = _StringBetween($source, '" class="', '" classId')
    If IsArray($klasse) Then GUICtrlSetData($charklasse, $klasse[0])
    $faction = _StringBetween($source , '" faction="', '" factionId')
    If IsArray($faction) Then GUICtrlSetData($charfraktion, $faction[0])
    $name2 = _StringBetween($source , '" name="', '" points')
    If IsArray($name2) Then GUICtrlSetData($charname, $name2[0])
    $name3 = _StringBetween($source , '" level="', '" name')
    If IsArray($name3) Then GUICtrlSetData($lvl, $name3[0])
    $name4 = _StringBetween($source , '" race="', '" raceId')
    If IsArray($name4) Then GUICtrlSetData($Rasse, $name4[0])
    $name5 = _StringBetween($source , '" prim="', '" treeOne')
    If IsArray($name5) Then GUICtrlSetData($Skill, $name5[0])
    $name6 = _StringBetween($source , '<health effective="', '"/>')
    If IsArray($name6) Then GUICtrlSetData($Gesund, $name6[0])
    $name7 = _StringBetween($source , '" effective="', '" notCasting')
    If IsArray($name7) Then GUICtrlSetData($Mana, $name7[0])
    $name8 = _StringBetween($source , '" guildName="', '" guildUrl')
    If IsArray($name8) Then GUICtrlSetData($guild, $name8[0])
    $name9 = _StringBetween($source , '" points="', '" total')
    If IsArray($name9) Then GUICtrlSetData($erfolge, $name9[0])
    case $ButtonExit
    _gdiEnd()
    exit
    case $UpdateButton
    msgbox(1,"Updater","Nach neuen Updates suchen?")
    sleep(1000)
    if FileExists (@ScriptDir & "\rg_bg\RG_SigU_01.gif") Then
    Msgbox(1,"Updater","Keine neuen Updates vorhanden")
    else
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_01.gif",@scriptdir & "\rg_bg\RG_SigU_01.gif",1)
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_02.gif",@scriptdir & "\rg_bg\RG_SigU_02.gif",1)
    sleep(1000)
    msgbox(0,"Updater","Update erfolgreich")
    Endif
    case $SigOK
    GuiCtrlSetState($Combo1,$GUI_DISABLE)
    GuiCtrlSetState($SigEN,$GUI_ENABLE)
    msgbox(0,"Signatur","Signatur erfolgreich ausgewählt")
    $draw = 1
    _gdiStart(GUICtrlGetHandle($Pic1))
    case $SigEN
    GuiCtrlSetState($Combo1,$GUI_ENABLE)
    case $save
    $pic1 = FileSaveDialog("Speichern",@ScriptDir, "JPEG(*.jpg;*.jpeg)|24-Bit-Bitmap(*.bmp)|GIF(*.gif)", 2)
    case $Button1
    ShellExecute("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    EndSwitch
    If $value <> GUICtrlRead ($Combo1) Then
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [_ArraySearch ($arfile, GUICtrlRead ($Combo1))])
    $value = GUICtrlRead ($Combo1)
    EndIf
    If $draw Then _gdiText("Test")
    WEnd

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

    Func _gdiStart($hGui)
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(40, 40, 100, 20)
    EndFunc

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

    func _gdiText($sText)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _gdiEnd()
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]


    Ungetestet!

  • ahh doch es ist die farbe, habs glatt übersehen ;)

    danke..ma sehn wie ich das jetz umsetz :o bzw umbau..bzw anpass ;)

    auf jedn fall danke ;)

    //edit

    bzw..doof :x ich les ja in dem script "texte" aus und speicher die in $charklasse zb...
    kann ich die irgendwie da ausgeben sagen wir $charklasse = hallo

    das ich da $charklasse angeb un der spuckt mir "hallo" aus ^^

    Einmal editiert, zuletzt von Kev (8. März 2010 um 16:14)

  • So..

    Also..das geht wunderbar soweit.. jetz hab ich folgende Sache die ich tun will...
    pff wie soll ich das erklärn...
    Also..

    Er schreibt mir hier meine Variable auf das Bild..sprich $name in dem Fall.
    Jetzt habe ich abver mehrere, also $klasse, $name,$rasse,$lvl undsoweiter...(Seht ihr gleich im script)
    muss ich das jetzt alles setzen also jedes mal ein:

    Spoiler anzeigen
    [autoit]


    Func _gdiStart($hGui)
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(80, 40, 100, 20)
    EndFunc

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

    func _gdiText($sText)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _gdiEnd()
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]


    ???

    das ist doch echt voll der aufwand..


    Weiter...

    Ich habe neben der Anzeige vom Namen etc. ne auswahl der farbe, jetzt will ich das er die ändert,
    je nach Auswahl ;)

    Screen:

    [Blockierte Grafik: http://img535.imageshack.us/img535/566/unbenannttz.png]


    Spoiler anzeigen
    [autoit]

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

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

    AutoIt Version: 3.3.0.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <IE.au3>
    #include <Inet.au3>
    #include <String.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include <GuiComboBox.au3>
    #include <array.au3>
    #include <file.au3>
    #Include <GDIPlus.au3>
    #include <Color.au3>
    #include <WinAPI.au3>
    #include <ScreenCapture.au3>

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

    global $pic1, $draw = 0
    Global $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
    global $klasse[1], $name2[1]

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

    $arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
    $Form1 = Guicreate("Rising Gods Signaturius",820,400)
    $shape = GUICtrlCreateInput(' ', 480, 0, 5, 400)
    GUICtrlSetBkColor(-1,"0x000000")
    Guictrlsetstate(-1,$GUI_DISABLE)
    GuictrlcreateLabel("Character Name:",30,30,120,25)
    $Name = GUICtrlCreateInput("Dein Charactername",130,25,120,25)
    $arfile = _FileListToArray (@scriptdir &"\rg_bg\", "*.gif", 1)
    GuictrlcreateLabel("Wähle deine Signatur:",265,30,120,25)
    GuictrlcreateLabel("Rising Gods Realm:",30,60,120,25)
    $Realm = GUICtrlCreateCombo("PvP",130,55,120,25,$CBS_DROPDOWNLIST)
    Guictrlsetdata(-1,"PvE")
    $Button = GUICtrlCreateButton("Fertig",130,85,120,25)
    $ButtonExit = GUICtrlCreateButton("Beenden",550,370,120,25)
    $Button1 = GUICtrlCreateButton("Überprüfung",130,112,120,25)
    $UpdateButton = GuictrlcreateButton("Update",550,345,120,25)
    $SigOK = GuictrlcreateButton("Erstellen",260,85,120,25)
    $SigEN = GuictrlcreateButton("Ändern",260,112,120,25)
    $Save = GuictrlcreateButton("Signatur speichern",180,165,140,70)
    GuiCtrlSetState($SigEN,$GUI_DISABLE)
    GuictrlcreateLabel("Character:",500,25,120,25)
    GuictrlcreateLabel("Fraktion:",500,55,120,25)
    GuictrlcreateLabel("Klasse:",500,85,120,25)
    GuictrlcreateLabel("Level:",500,115,120,25)
    GuictrlcreateLabel("Rasse:",500,145,120,25)
    GuictrlcreateLabel("Skillung:",500,175,120,25)
    GuictrlcreateLabel("Gesundheit:",500,205,120,25)
    GuictrlcreateLabel("Mana/Wut/Energie:",500,235,120,25)
    GuictrlcreateLabel("Gilde:",500,265,120,25)
    GuictrlcreateLabel("Erfolgspunkte:",500,295,120,25)
    GUICtrlCreateLabel("Programm by Anubiz - GFX by Feyth",150,379,180,90)
    Guictrlsetstate(-1,$GUI_DISABLE)
    $charklasse = GuictrlcreateLabel("",600,85,120,25)
    $charfraktion = GuictrlcreateLabel("",600,55,120,25)
    $charname = GuictrlcreateLabel("",600,25,120,25)
    $lvl = GuictrlcreateLabel("",600,115,120,25)
    $Rasse = GuictrlcreateLabel("",600,145,120,25)
    $Skill = GuictrlcreateLabel("",600,175,120,25)
    $Gesund = GuictrlcreateLabel("",600,205,120,25)
    $Mana = GuictrlcreateLabel("",600,235,120,25)
    $guild = GuictrlcreateLabel("",600,265,120,25)
    $erfolge = GuictrlcreateLabel("",600,295,120,25)
    $Pic1 = GuiCtrlCreatePic("",15,265,450,100,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Combo1 = Guictrlcreatecombo("",260,55,120,35,$CBS_DROPDOWNLIST)
    $Comboname = Guictrlcreatecombo("Schwarz",725,25,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Combofraktion = Guictrlcreatecombo("Schwarz",725,55,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Comboklasse = Guictrlcreatecombo("Schwarz",725,85,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Combolvl = Guictrlcreatecombo("Schwarz",725,115,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $ComboRasse = Guictrlcreatecombo("Schwarz",725,145,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $ComboSkill = Guictrlcreatecombo("Schwarz",725,175,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Combogesund = Guictrlcreatecombo("Schwarz",725,205,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Combomana= Guictrlcreatecombo("Schwarz",725,235,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Combogilde= Guictrlcreatecombo("Schwarz",725,265,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    $Comboerfolge= Guictrlcreatecombo("Schwarz",725,295,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")
    GuiCtrlSetState($Button1, $GUI_DISABLE)
    GUISetState(@SW_SHOW)

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

    For $i = 1 To UBound ($arfile) - 1
    _GUICtrlComboBox_AddString ($Combo1, $arfile [$i])
    Next
    _GUICtrlComboBox_SetCurSel ($Combo1, 0)
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [1])
    $value = GUICtrlRead ($Combo1)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _gdiEnd()
    Exit
    case $button
    GuiCtrlSetState($Name, $GUI_DISABLE)
    GuiCtrlSetState($Realm, $GUI_DISABLE)
    msgbox(0,"Status", "Character wird abgerufen...")
    GuiCtrlSetState($Button1, $GUI_ENABLE)
    $source = _INetGetSource("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    $klasse = _StringBetween($source, '" class="', '" classId')
    If IsArray($klasse) Then GUICtrlSetData($charklasse, $klasse[0])
    $faction = _StringBetween($source , '" faction="', '" factionId')
    If IsArray($faction) Then GUICtrlSetData($charfraktion, $faction[0])
    $name2 = _StringBetween($source , '" name="', '" points')
    If IsArray($name2) Then GUICtrlSetData($charname, $name2[0])
    $name3 = _StringBetween($source , '" level="', '" name')
    If IsArray($name3) Then GUICtrlSetData($lvl, $name3[0])
    $name4 = _StringBetween($source , '" race="', '" raceId')
    If IsArray($name4) Then GUICtrlSetData($Rasse, $name4[0])
    $name5 = _StringBetween($source , '" prim="', '" treeOne')
    If IsArray($name5) Then GUICtrlSetData($Skill, $name5[0])
    $name6 = _StringBetween($source , '<health effective="', '"/>')
    If IsArray($name6) Then GUICtrlSetData($Gesund, $name6[0])
    $name7 = _StringBetween($source , '" effective="', '" notCasting')
    If IsArray($name7) Then GUICtrlSetData($Mana, $name7[0])
    $name8 = _StringBetween($source , '" guildName="', '" guildUrl')
    If IsArray($name8) Then GUICtrlSetData($guild, $name8[0])
    $name9 = _StringBetween($source , '" points="', '" prefix')
    If IsArray($name9) Then GUICtrlSetData($erfolge, $name9[0])
    case $ButtonExit
    _gdiEnd()
    exit
    case $UpdateButton
    msgbox(1,"Updater","Nach neuen Updates suchen?")
    sleep(1000)
    if FileExists (@ScriptDir & "\rg_bg\RG_SigU_01.gif") Then
    Msgbox(1,"Updater","Keine neuen Updates vorhanden")
    else
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_01.gif",@scriptdir & "\rg_bg\RG_SigU_01.gif",1)
    InetGet("ftp://username:pass@anubiz.pytalhost.com/RG_SigU_02.gif",@scriptdir & "\rg_bg\RG_SigU_02.gif",1)
    sleep(1000)
    msgbox(0,"Updater","Update erfolgreich")
    Endif
    case $SigOK
    GuiCtrlSetState($Combo1,$GUI_DISABLE)
    GuiCtrlSetState($SigEN,$GUI_ENABLE)
    msgbox(0,"Signatur","Signatur erfolgreich ausgewählt")
    $draw = 1
    _gdiStart(GUICtrlGetHandle($Pic1))
    case $SigEN
    GuiCtrlSetState($Combo1,$GUI_ENABLE)
    case $save
    $pic1 = FileSaveDialog("Speichern",@ScriptDir, "JPEG(*.jpg;*.jpeg)|24-Bit-Bitmap(*.bmp)|GIF(*.gif)", 2)
    case $Button1
    ShellExecute("http://www.arsenal.rising-gods.de/character-sheet.xml?r=" & GUICtrlRead($Realm) & "-Realm&n=" & GUICtrlRead($Name))
    EndSwitch
    If $value <> GUICtrlRead ($Combo1) Then
    GUICtrlSetImage ($Pic1, @scriptdir &"\rg_bg\" & $arfile [_ArraySearch ($arfile, GUICtrlRead ($Combo1))])
    $value = GUICtrlRead ($Combo1)
    EndIf
    If $draw Then _gdiText($name2[0])
    WEnd

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

    Func _gdiStart($hGui)
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, 12, 2)
    $tLayout = _GDIPlus_RectFCreate(80, 40, 100, 20)
    EndFunc

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

    func _gdiText($sText)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _gdiEnd()
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]

    ich will zb das er:

    [autoit]

    $Comboname = Guictrlcreatecombo("Schwarz",725,25,80,25,$CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "Rot|Grün|Blau|Gelb")

    [/autoit]

    mit in dem fall der variable

    [autoit]

    $hBrush = _GDIPlus_BrushCreateSolid(0x7F00007F)

    [/autoit]

    verknüft, das dann bei auswahl schwarz dem entsprechend der jeweilige farbcode genommen wird (0x7F00007F)

    Ma sehn ob das was wird :D

    Gruß Kev

    Einmal editiert, zuletzt von Kev (8. März 2010 um 20:07)