Hi bräuchte mal eure hilfe dabei

  • und zwar wenn ich im editor was schreibe und speicher kommt es so raus

    Spoiler anzeigen
    [autoit]

    <font size="2">hhetetetrerefef
    bgettggeegge
    ghggggeetgeeg
    ghgettegege
    </font><b><font size="2"><br></div>

    [/autoit]


    es soll aber so aus sehen

    Spoiler anzeigen
    [autoit]


    <p><b>dies ist ein Test<br>
    <font size="2"><br><br></font></b><font size="2">hhetetetrerefef</font><b><font size="2"><br>
    <font size="2"><br><br></font></b><font size="2">bgettggeegge</font><b><font size="2"><br>
    <font size="2"><br><br></font></b><font size="2">ghggggeetgeeg</font><b><font size="2"><br>
    <font size="2"><br><br></font></b><font size="2">ghgettegege</font><b><font size="2"><br>

    [/autoit]

    was ist da falsch ?


    code:

    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include <Array.au3>
    Dim $Code[2]
    $Code[0] = '<table width="800" border="0" cellspacing="0" cellpadding="0">'& @CRLF &'<tr height="23">'& @CRLF &'<td valign="top" height="23" background="images/default/tabelle-oben.jpg">' & @CRLF _
    &'<div align="center">'& @CRLF & '<table width="800" border="0" cellspacing="0" cellpadding="0" height="23">' & @CRLF & '<tr>'& @CRLF & '<td width="2"></td>'& @CRLF & '<td>'& @CRLF _
    &'<div align="left">'&@CRLF& '<font color="black" face="Arial, Helvetica, sans-serif"><b>Top News vom' & @MDAY & "." & @MON & "." & @YEAR & '</b></font><b><font color="black" face="Arial, Helvetica, sans-serif" size="2"><br>'& @CRLF _
    &'</font></b></div>'& @CRLF & '</td>'& @CRLF & '<td width="2"></td>'& @CRLF &'</tr>'& @CRLF &'</table>'& @CRLF &'</div>'& @CRLF &'</td>'& @CRLF &'</tr>'& @CRLF &'<tr><td valign="top" background="images/default/tabelle-mitte.jpg">'& @CRLF _
    &'<div align="center">'& @CRLF & '<br>'& @CRLF & '<table width="800" border="0" cellspacing="2" cellpadding="0">'& @CRLF & '<tr><td valign="top" width="1">'& @CRLF & '<br>'& @CRLF & '</td>'& @CRLF & '<td valign="top" width="780">'& @CRLF _
    &'<div align="left">'& @CRLF
    $Code[1] = '</div>'& @CRLF & '</td>'& @CRLF & '<td valign="top" width="1"><br>'& @CRLF & '</td></tr></table></div></td></tr><tr height="23">'& @CRLF & '<td height="23" background="images/default/tabelle-oben.jpg"><br></td></tr></table><br>[1] &gt;&gt;'& @CRLF

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

    #cs
    HotKeySet("{Return}", "EnterWasPressed")
    #ce
    #Region ### START Koda GUI section ### Form=c:\users\standart\desktop\koda_1.7.3.0\forms\form1.kxf
    $Form1_1 = GUICreate("Form1", 500, 339, -1, -1)
    $Edit1 = GUICtrlCreateEdit("", 8, 96, 480, 200)
    GUICtrlSetData(-1,"")
    $Button1 = GUICtrlCreateButton("Speichern", 416, 304, 75, 25)
    $Input1 = GUICtrlCreateInput("", 8, 40, 480, 21)
    $Label1 = GUICtrlCreateLabel("Titel", 8, 8, 62, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label2 = GUICtrlCreateLabel("Text", 8, 72, 38, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $file = FileOpen(@ScriptDir & "\news.txt", 1)
    If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")


    Exit

    EndIf
    FileWrite($file,$Code[0])
    FileWrite($file,'<p><b>' & GUICtrlRead ($Input1)& '<br>'& @CRLF & '<font size="2"><br><br>')
    FileWrite($file,'</font></b><font size="2">' & GUICtrlRead ($Edit1)&'</font><b><font size="2"><br>')
    FileWrite($file,$Code[1])
    FileClose($file)
    EndSwitch
    WEnd
    #cs
    Func EnterWasPressed()
    GUICtrlSetState($edit1, Send('</font><b><font size="2"><br>')& @CRLF)
    EndFunc

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

    Einmal editiert, zuletzt von Sirocool (24. September 2011 um 13:38)

  • bitte schön:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include <Array.au3>
    Dim $Code[2]
    $Code[0] = '<table width="800" border="0" cellspacing="0" cellpadding="0">'& @CRLF &'<tr height="23">'& @CRLF &'<td valign="top" height="23" background="images/default/tabelle-oben.jpg">' & @CRLF _
    &'<div align="center">'& @CRLF & '<table width="800" border="0" cellspacing="0" cellpadding="0" height="23">' & @CRLF & '<tr>'& @CRLF & '<td width="2"></td>'& @CRLF & '<td>'& @CRLF _
    &'<div align="left">'&@CRLF& '<font color="black" face="Arial, Helvetica, sans-serif"><b>Top News vom' & @MDAY & "." & @MON & "." & @YEAR & '</b></font><b><font color="black" face="Arial, Helvetica, sans-serif" size="2"><br>'& @CRLF _
    &'</font></b></div>'& @CRLF & '</td>'& @CRLF & '<td width="2"></td>'& @CRLF &'</tr>'& @CRLF &'</table>'& @CRLF &'</div>'& @CRLF &'</td>'& @CRLF &'</tr>'& @CRLF &'<tr><td valign="top" background="images/default/tabelle-mitte.jpg">'& @CRLF _
    &'<div align="center">'& @CRLF & '<br>'& @CRLF & '<table width="800" border="0" cellspacing="2" cellpadding="0">'& @CRLF & '<tr><td valign="top" width="1">'& @CRLF & '<br>'& @CRLF & '</td>'& @CRLF & '<td valign="top" width="780">'& @CRLF _
    &'<div align="left">'& @CRLF
    $Code[1] = '</div>'& @CRLF & '</td>'& @CRLF & '<td valign="top" width="1"><br>'& @CRLF & '</td></tr></table></div></td></tr><tr height="23">'& @CRLF & '<td height="23" background="images/default/tabelle-oben.jpg"><br></td></tr></table><br>[1] &gt;&gt;'& @CRLF

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

    #cs
    HotKeySet("{Return}", "EnterWasPressed")
    #ce
    #Region ### START Koda GUI section ### Form=c:\users\standart\desktop\koda_1.7.3.0\forms\form1.kxf
    $Form1_1 = GUICreate("Form1", 500, 339, -1, -1)
    $Edit1 = GUICtrlCreateEdit("", 8, 96, 480, 200)
    GUICtrlSetData(-1,"")
    $Button1 = GUICtrlCreateButton("Speichern", 416, 304, 75, 25)
    $Input1 = GUICtrlCreateInput("", 8, 40, 480, 21)
    $Label1 = GUICtrlCreateLabel("Titel", 8, 8, 62, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    $Label2 = GUICtrlCreateLabel("Text", 8, 72, 38, 24)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $file = FileOpen(@ScriptDir & "\news.txt", 2)
    If $file = -1 Then Exit MsgBox(0, "Error", "Unable to open file.")
    FileWrite($file,$Code[0])
    FileWrite($file,'<p><b>' & GUICtrlRead ($Input1)& '<br>'& @CRLF & '<font size="2"><br><br>')
    $aEdit1 = StringSplit(GUICtrlRead ($Edit1),@CRLF)
    For $i = 1 To $aEdit1[0]
    If $aEdit1[$i] <> '' Then FileWriteLine($file, '<font size="2"><br><br></font></b><font size="2">'&$aEdit1[$i]&'</font><b><font size="2"><br>')
    Next
    FileWrite($file,$Code[1])
    FileClose($file)
    EndSwitch
    WEnd
    #cs
    Func EnterWasPressed()
    GUICtrlSetState($edit1, Send('</font><b><font size="2"><br>')& @CRLF)
    EndFunc
    #ce

    [/autoit]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    über mich...

    ich habe meine Erfahrungen hauptsächlich gesammelt in (grobe Übersicht):

    - RibbonBar Automation
    - MySQL Nutzung
    - GUIs in vielerlei Ausprägung
    - Nutzung von Powershell / Batch in AutoIt
    - Windows Automatisierung

    außerhalb von AutoIt:

    - Sprachen: PS, Batch, php, html(5), javascript, (perl eingeschränkt), vbs
    - Powershell (AD, WPF inkl. Multi-Threading, ...)
    - Deployment-Automatisierung ohne SCCM
    - Office-Nutzung mit COM-Object (AutoIt, PowerShell)
    - ActiveDirectory und alles was damit zusammenhängt
    - Hyper-V Clustering (Converged / Hyper Converged)
    - Serverhardware (Konfiguration, Aufbau, Architektur, Betrieb)

    Lieblingsthema:

    günstige Automatisierung von Vorgängen, für die andere Firmen viel Geld nehmen

    more to come ...