Inhalt einer Edit box zu einem string umwandeln

  • Hi ich breucht mal wieder hilfe.

    Also ich habe eine edit box da sollen html seinten rein.

    http://www.test.de/

    http://www.bild.de/

    http://www.google.de/

    ....

    die box ist kein problem nur solte es dann amschlus eine string ergeben der dan so aussied.

    <a href="www.test.de">01</a><a href="http://www.bild.de/">02</a><a href="http://www.google.de%22%3e03%3c/a>....

    wie stelle ich das den am blödesten an. Wäre supper wen jemand helfen könnte.

    Einmal editiert, zuletzt von Evoli_66 (11. Mai 2009 um 15:36)

  • Poste mal bitte das Script soweit es fertig ist, dann kann man besser helfen.
    Vielen Dank.

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Verwechsel bitte nich AutoIT mir HTML ^^ ... Ich glaube du meinst, dass wenn man auf das Label draufklickt, dass es den INternet- Explorer öffnent und die gleiche Funktion ausführ als wenn du bei einer HMTL Seite auf

    Code
    <a href="www.test.de">01</a><a href="www.bild.de">02</a><a href="www.google.de">03</a>....

    klicken würdes...


    Bitte Poste doch dein Script mal um zu verstehen was du überhaupt willst ^^


    MFG Scripter192

  • nein ich verwegsel da nichts das tool erstelt mir eine vorlage die ich dan einfügen kann.


    Hier der das tool was ich bis jetzt habe.

    Spoiler anzeigen
    [autoit]

    If not FileExists ("C:\PSPISO") Then DirCreate ("C:\PSPISO")

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

    FileInstall ("c:\PSPISO\bild.jpg","c:\PSPISO\bild.jpg")
    FileInstall ("c:\PSPISO\Vorlage.txt","c:\PSPISO\Vorlage.txt")
    $Pic = ""
    $Groesse = ""
    $Sprache = ""
    $PW = ""
    $NFO = ""
    $Aktiv1 = ""
    $Aktiv2 = ""
    $Aktiv3 = ""
    $Aktiv4 = ""
    $Aktiv5 = ""
    $Aktiv6 = ""
    $LinkRS = ""
    #include <GUIConstants.au3>
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <TabConstants.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>
    #Region ### START Koda GUI section ### Form=d:\auto it tool und scrips\vorlagen tool.kxf
    $Form1_1 = GUICreate("PSP-ISO Vorlagen Tool", 784, 699, 125, 217)
    $Label1 = GUICtrlCreateLabel("Mit diesem Tool Kast du ganz schnell die Vorlage ", 176, 120, 423, 28, $SS_CENTER)
    GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
    $Pic1 = GUICtrlCreatePic("c:\PSPISO\bild.jpg", 80, 0, 636, 116, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Label2 = GUICtrlCreateLabel("erstelen für dein Upload", 272, 152, 204, 28, $SS_CENTER)
    GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
    $Label3 = GUICtrlCreateLabel("HTML vom Bild:", 112, 192, 114, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input1 = GUICtrlCreateInput("", 232, 192, 369, 21)
    $Label4 = GUICtrlCreateLabel("z.b. http://picbox.us/img/bilder/full/User_47f1b9a54a03c.jpg", 240, 216, 294, 17)
    $Label5 = GUICtrlCreateLabel("Grösse:", 40, 248, 60, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input2 = GUICtrlCreateInput("", 104, 248, 65, 21)
    $Label6 = GUICtrlCreateLabel("MB", 176, 248, 28, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Label7 = GUICtrlCreateLabel("Sprache:", 248, 248, 68, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input3 = GUICtrlCreateInput("", 320, 248, 121, 21)
    $Label8 = GUICtrlCreateLabel("z.b. Germany, Englisch, Multi", 320, 272, 140, 17)
    $Label9 = GUICtrlCreateLabel("Rapidshare:", 16, 325, 90, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 110, 331, 13, 13)
    $Label11 = GUICtrlCreateLabel("Netload:", 40, 371, 63, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Checkbox2 = GUICtrlCreateCheckbox("Checkbox1", 110, 376, 13, 13)
    $Label13 = GUICtrlCreateLabel("Uploaded:", 24, 420, 77, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Checkbox3 = GUICtrlCreateCheckbox("Checkbox1", 110, 425, 13, 13)
    $Label15 = GUICtrlCreateLabel("Share-Online:", 400, 325, 101, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Checkbox4 = GUICtrlCreateCheckbox("Checkbox1", 502, 331, 13, 13)
    $Label17 = GUICtrlCreateLabel("Password:", 552, 248, 77, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Input8 = GUICtrlCreateInput("", 632, 248, 121, 21)
    $Label18 = GUICtrlCreateLabel("NFO Text:", 104, 488, 75, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Checkbox5 = GUICtrlCreateCheckbox("Checkbox1", 502, 376, 13, 13)
    $Label12 = GUICtrlCreateLabel("MegaUpload:", 405, 420, 97, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    $Checkbox6 = GUICtrlCreateCheckbox("Checkbox1", 502, 425, 13, 13)
    $Edit1 = GUICtrlCreateEdit("", 184, 488, 393, 201)
    GUICtrlSetData(-1, "")
    $Button1 = GUICtrlCreateButton("Erstellen", 32, 584, 75, 25, 0)
    $Button2 = GUICtrlCreateButton("Abbrechen", 656, 584, 75, 25, 0)
    $Edit2 = GUICtrlCreateEdit("", 136, 320, 241, 41)
    GUICtrlSetData(-1, "")
    $Edit3 = GUICtrlCreateEdit("", 136, 369, 241, 41)
    GUICtrlSetData(-1, "")
    $Edit4 = GUICtrlCreateEdit("", 136, 417, 241, 41)
    GUICtrlSetData(-1, "")
    $Edit5 = GUICtrlCreateEdit("", 524, 320, 241, 41)
    GUICtrlSetData(-1, "")
    $Edit6 = GUICtrlCreateEdit("", 524, 369, 241, 41)
    GUICtrlSetData(-1, "")
    $Edit7 = GUICtrlCreateEdit("", 524, 417, 241, 41)
    GUICtrlSetData(-1, "")
    $Label10 = GUICtrlCreateLabel("FileFactory:", 415, 371, 86, 24)
    GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button2
    Exit
    Case $Button1
    Start ()
    EndSwitch
    WEnd
    Func Start ()
    $Pic = GUICtrlRead ($Input1)
    $Groesse = GUICtrlRead ($Input2)
    $Sprache = GUICtrlRead ($Input3)

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

    $Aktiv1 = GUICtrlRead ($Checkbox1)
    $Aktiv2 = GUICtrlRead ($Checkbox2)
    $Aktiv3 = GUICtrlRead ($Checkbox3)
    $Aktiv4 = GUICtrlRead ($Checkbox4)
    $Aktiv5 = GUICtrlRead ($Checkbox5)
    $Aktiv6 = GUICtrlRead ($Checkbox6)

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

    $PW = GUICtrlRead ($Input8)
    $NFO = GUICtrlRead ($Edit1)

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

    Erstelen ()
    EndFunc

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

    Func Erstelen ()
    If FileExists ("c:\Vorlage.txt") Then
    FileDelete ("c:\Vorlage.txt")
    Sleep (1000)
    EndIf
    $file = FileOpen("c:\Vorlage.txt", 1)
    If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
    EndIf
    FileWrite($file, '<center><img src="' & $Pic & '" alt="" width="269" />'& @CRLF)
    FileWrite($file, '<<strong>Größe:</strong> ' & $Groesse & ' MB' & @CRLF)
    FileWrite($file, '<strong>Sprache: ' & $Sprache & '</strong>' & @CRLF)
    If $Aktiv1 = 1 then FileWrite($file, '<strong>Rapidshare:</strong> ' & @CRLF)
    If $Aktiv2 = 1 then FileWrite($file, '<strong>Netload:</strong> ' & @CRLF)
    If $Aktiv3 = 1 then FileWrite($file, '<strong>Uploaded:</strong> ' & @CRLF)
    If $Aktiv4 = 1 then FileWrite($file, '<strong>Share-Online:</strong> ' & @CRLF)
    If $Aktiv5 = 1 then FileWrite($file, '<strong>FileFactory:</strong> ' & @CRLF)
    If $Aktiv6 = 1 then FileWrite($file, '<strong>MegaUpload:</strong> ' & @CRLF)
    FileWrite($file, '<strong>Passwort:</strong> ' & $PW & @CRLF)
    FileWrite($file, '<strong>NFO / Fileinfo:</strong>

    [/autoit]
    Spoiler anzeigen
    [autoit]

    ' & $NFO & '

    [/autoit]
    [autoit]

    </center>' & @CRLF)
    FileClose($file)
    Sleep (1000)
    Run ("notepad.exe c:\Vorlage.txt")
    EndFunc

    [/autoit]

    als ergebnis sol dann halt das raus kommen.


    Spoiler anzeigen
    Code
    <center><img src="" alt="" width="269" /> 
    <strong>Größe:</strong> MB 
    <strong>Sprache: </strong> 
    <strong>Filefactory:</strong> <a href="www.ddd.de" target="_blank">01</a> <a href="www.ddd2.de" target="_blank">02</a><a href=www.ddd3.detarget="_blank">03</a> 
    <strong>share-online:</strong> <a href=www.fff.detarget="_blank">01</a> <a href=www.fff2.detarget="_blank">02</a><a href="www.fff3.de"target="_blank">03</a> 
    
    
    <strong>Passwort:</strong> 
    <strong>NFO / Fileinfo:</strong> [spoiler]Hier dein text[/spoiler]</center>

    [/spoiler]

  • Mit solchen Sätzen

    Zitat

    erstelt mir eine vorlage die ich dan einfügen kann.


    wirst du hier nicht viel erreichen.

    Wie wäre es mal
    1. Richtiges Deutsch zu "schriebne", sonst "verwegseln" wir noch was.
    2. Nett zu fragen?

  • Du hast ja recht sorry. Eben zu meiner Person ich bin Legastheniker und habe eine rechtschreib schwäche und da für entschuldige ich mich. Es wäre trotz dem Super lieb von euch mir zu helfen. Ich mache dieses Tool für mich da mit ich weniger Arbeit habe und ein einheitliches Bild.

  • Das Problem ist mal sind es 2 links mal können es aber auch 10 sein und das ist schwer mit einzelnen Labels zu machen weil die GUI dann zu groß wird.

    Als Beispiel:

    Spoiler anzeigen


    So sehen die links aus und als Ergebnis soll dann nur noch 01 02 03 04 05 06 bei raus kommen. 

    Aber wie gesagt mal sind es mehr links mal weniger.

    .

  • [autoit]

    $EditText=GUICtrlRead($Edit)
    $array=StringSplit($EditText,@CR)
    Dim $endString
    For $i=1 To $array[0]
    $array[$i]=StringReplace($array[$i],@LF,"")
    $endString &= '<a href="' & $array[$i] & '" target="_blank">' & StringFormat("%02d",$i) & '</a>' & @CRLF
    Next
    MsgBox(0,"",$endString)

    [/autoit]


    Statt $Edit musst du dein Edit-Handle eintragen, also z.B. $Edit1 :rolleyes:

    Twitter: @L3viathan2142
    Benutze AutoIt persönlich nicht mehr, da ich keinen Windows-Rechner mehr besitze.

  • So, da du scheinbar nett sein kannst hier mal ne hilfe :D


    Auslesen mit:

    [autoit]


    $deinevariable1 = _GUICtrlEdit_GetLine($EditFeld1, 1)
    $deinevariable2 = _GUICtrlEdit_GetLine($EditFeld1, 2)
    $deinevariable3 = _GUICtrlEdit_GetLine($EditFeld1, 3)

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

    $deinevariable = die $ mit der du arbeitest
    $EditFeld1 = Variable des Edit Fensters
    1-3 (kann unendlich weiter gehen) = Zeilen Nr

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

    und so weiter halt. am besten wenn du weißt das es maximal 20 links
    sind einfach die ersten 20 zeilen lesen ;)

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

    Bis "$deinevariable20 = _GUICtrlEdit_GetLine($EditFeld1, 20)" z.b.

    [/autoit]

    Dann das ganze in HTML mit:

    [autoit]


    $meinedatei = FileOpen("Link zu meiner File",2) (2 wegen leer, sonst 0)
    FileWrite($meinedatei, "<center><img src="" alt="" width=""269"" />"
    FileWrite($meinedatei, "<strong>Größe:</strong> MB"
    FileWrite($meinedatei, "<strong>Sprache: </strong>"
    FileWrite($meinedatei, "<strong>Filefactory:</strong> <a href=" & $deinevariable1 & " target=""_blank"">01</a>"
    FileClose($meindatei)

    [/autoit]

    Sollte gehen ;)

    2 Mal editiert, zuletzt von Sen (11. Mai 2009 um 15:35)

  • Das von L3viathan2142ist schon das was ich gesucht habe. Es gab nur ein Problem bei seinem Vorschlag das sich aber mit löschen des @CRLF gelöst hat. Danke dir.

    Und auch an dich Sen danke für deine Mühe doch leider warst du ein kleinen tick zu langsam.