komme nicht weiter! Bitte helft mir!

  • Wenn ich auf Speichern klicke speichert er es nicht! Könnt ihr bitte gucken was ich falsch gemacht habe?

    [autoit]

    #include <GUIConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("slin WOORRT 2010 (powerd by slin.jimdo.com)", 1124, 699, 193, 125)
    GUICtrlCreateEdit("", 16, 48, 1097, 649)
    $Label1 = GUICtrlCreateLabel("slin WOORRT 2010", 368, 0, 324, 43)
    GUICtrlSetFont(-1, 25, 400, 0, "DejaVu Sans Mono")
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Close", 0, 0, 49, 17)
    $Button2 = GUICtrlCreateButton("Speichern", 56, 0, 89, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Exit
    case $Button1
    exit
    case $Button2
    $MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"

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

    $var = FileSaveDialog( "Choose a name.", $MyDocsFolder, "Text (*.*)", 2)
    ; option 2 = dialog remains until valid path/file selected

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

    If @error Then
    MsgBox(4096,"","Save cancelled.")
    Else
    MsgBox(4096,"","You chose " & $var)
    EndIf

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

    ; Multiple filter group
    $var = FileSaveDialog( "Choose a name.", $MyDocsFolder, "Text files (*.*)", 2)
    ; option 2 = dialog remains until valid path/file selected

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

    If @error Then
    MsgBox(4096,"","Speichern storniert.")
    Else
    MsgBox(4096,"","Sie wählten " & $var)
    EndIf
    EndSwitch
    WEnd

    [/autoit]


    ?( ?( ?( ?( ?( ?( ?( ?( ?( ?( ?( ?( ?(

    Einmal editiert, zuletzt von slin (28. September 2009 um 17:28)

  • Bitte schön ich hab dir auch dein rotes Kreuz zum laufen gebracht.
    Wenn das ein Texteditor werden soll solltest du aber lieber Menüs nehmen ,anstatt die Buttons da oben(guictrlcreatemenu).


    [autoit]


    #include <GUIConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("slin WOORRT 2010 (powerd by slin.jimdo.com)", 1124, 699, 193, 125)
    $edit=GUICtrlCreateEdit("", 16, 48, 1097, 649)
    $Label1 = GUICtrlCreateLabel("slin WOORRT 2010", 368, 0, 324, 43)
    GUICtrlSetFont(-1, 25, 400, 0, "DejaVu Sans Mono")
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Close", 0, 0, 49, 17)
    $Button2 = GUICtrlCreateButton("Speichern", 56, 0, 89, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    case $GUI_EVENT_CLOSE
    exit

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

    case $Button1
    exit
    case $Button2
    $MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"

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

    $var = FileSaveDialog( "Choose a name.", $MyDocsFolder, "Text (*.*)", 2)
    ; option 2 = dialog remains until valid path/file selected

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

    If @error Then
    MsgBox(4096,"","Save cancelled.")
    Else
    MsgBox(4096,"","You chose " & $var)
    $file=fileopen($var&".txT",1)
    filewrite($file,guictrlread($edit))
    fileclose($file)
    EndIf
    EndSwitch
    WEnd

    [/autoit]


    Mfg