Probleme mit while in while

  • ich möchte gerne, wenn ich eine taste drücke, die erste while-schleife wiederholen lassen. also müsste ich "continueloop2" in der 2ten while-schleife setzten, damit an der stelle die erste wiederholt wird. nur passiert das bei mir nicht.
    wenn ich "exitloop" setze, funktioniert das script super, nur halt eben einmal, dann müsste es neu gestartet werde.
    bin ich hier auf dem holzweg oder überseh ich hier nur etwas?

    [autoit]

    Opt("WinTitleMatchMode", 2)
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <FTPEx.au3>
    #include <Array.au3>
    #include <misc.au3>

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

    Global $sPassword = "****"
    Global $sUser = "username"
    Global $sServer = "www.server.com"
    Global $spath = @scriptdir & "\save "&@UserName&".ini"
    Global $sOrdner = "/"
    Global $sFilename = "save "&@UserName&".ini"
    Global $Input2
    While 1 ;hier her soll beim drücken der taste das script wieder springen
    if WinWaitActive("alte seite") then WinClose ("alte seite")
    $Form1 = GUICreate("Flatcast Login", 199, 230, 4,30,"",$WS_EX_TOPMOST)
    $Edit1 = GUICtrlCreatelabel("Please login in:", 14, 5)
    GUICtrlSetFont ($Edit1, 8.5,"","","thimes new roman")
    $Edit2 = GUICtrlCreatelabel("User", 14, 47)
    GUICtrlSetFont ($Edit2, 8.3,"","","thimes new roman")
    $Input1 = GUICtrlCreateInput("", 14, 60,123,23)
    $button1 = GUICtrlCreateButton("Guest", 141, 60, 45, 23,"",$WS_TABSTOP)

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

    GUICtrlSetFont ($button1, 8.5,"","","thimes new roman")
    $Edit3 = GUICtrlCreatelabel("Password", 14, 90)
    GUICtrlSetFont ($Edit3, 8.3,"","","thimes new roman")
    $Input2 = GUICtrlCreateInput("", 14, 108,123,23,$ES_PASSWORD)
    $button2 = GUICtrlCreateButton("I am new and want to register", 14, 165, 172, 23)
    GUICtrlSetFont ($button2, 8.5,"","","thimes new roman")
    $button3 = GUICtrlCreateButton("?", 157, 138, 23, 23)
    GUICtrlSetFont ($button3, 8,"","","thimes new roman")
    $button4 = GUICtrlCreateCheckbox("", 14, 144, 14, 14)
    $Edit4 = GUICtrlCreatelabel("Enable Automatic Login", 29, 144)
    GUICtrlSetFont ($Edit4, 8.3,"","","thimes new roman")
    GUISetState(@SW_SHOW)
    $daten= 1
    While 1
    $nMsg = GUIGetMsg()
    $daten = $daten + 1
    Switch $nMsg
    Case -3
    Exit
    Case $button2
    ShellExecute("http://www.flatcast.info/WizUsr.aspx", "", @SW_MAXIMIZE)
    Case $button3
    ShellExecute("http://flatcast.info/FCForum.aspx?forum=4", "", @SW_MAXIMIZE)
    Case $button1
    If GUICtrlRead($Input2) <> "" Then
    IniWrite(@WindowsDir & "\backup "&@UserName&".ini", "User", $daten, GUICtrlRead($Input1) & "|" & GUICtrlRead($Input2));
    ContinueLoop 2;beim drücken der taste hoch zum 1ten while 1 ;continueLoop 2 geht in diesem script nicht
    EndIf

    Case Else
    If GUICtrlRead($Input2) <> "" Then
    GUICtrlSetData($button1, "Next")
    Else
    GUICtrlSetData($button1, "Guest")
    EndIf
    EndSwitch
    WEnd
    wend

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

    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

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

    _FTP_ProgressUpload($hConnect, $sPath, $sOrdner&$sFilename, "_Update_Progress")
    ;
    Func _Update_Progress($iProzent)
    If _IsPressed("77") Then Return 0
    Return 1
    EndFunc

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

    _FTP_Close($hOpen)
    _FTP_Close($hConnect)

    [/autoit]


    danke

    3 Mal editiert, zuletzt von AsiX-5 (23. März 2011 um 15:51)

  • Hallo AsiX-5,

    da hilft vielleicht ExitLoop :

    Spoiler anzeigen
    [autoit]

    Opt("WinTitleMatchMode", 2)
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <FTPEx.au3>
    #include <Array.au3>
    #include <misc.au3>

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

    Global $sPassword = "****"
    Global $sUser = "username"
    Global $sServer = "www.server.com"
    Global $spath = @ScriptDir & "\save " & @UserName & ".ini"
    Global $sOrdner = "/"
    Global $sFilename = "save " & @UserName & ".ini"
    Global $Input2
    While 1 ;hier her soll beim drücken der taste das script wieder springen
    If WinWaitActive("alte seite","",5) Then WinClose("alte seite") ;sonnst hängt das Skript hier das musst du dir was anderes einfallen lassen
    $Form1 = GUICreate("Flatcast Login", 199, 230, 4, 30, "", $WS_EX_TOPMOST)
    $Edit1 = GUICtrlCreateLabel("Please login in:", 14, 5)
    GUICtrlSetFont($Edit1, 8.5, "", "", "thimes new roman")
    $Edit2 = GUICtrlCreateLabel("User", 14, 47)
    GUICtrlSetFont($Edit2, 8.3, "", "", "thimes new roman")
    $Input1 = GUICtrlCreateInput("", 14, 60, 123, 23)
    $button1 = GUICtrlCreateButton("Guest", 141, 60, 45, 23, "", $WS_TABSTOP)

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

    GUICtrlSetFont($button1, 8.5, "", "", "thimes new roman")
    $Edit3 = GUICtrlCreateLabel("Password", 14, 90)
    GUICtrlSetFont($Edit3, 8.3, "", "", "thimes new roman")
    $Input2 = GUICtrlCreateInput("", 14, 108, 123, 23, $ES_PASSWORD)
    $button2 = GUICtrlCreateButton("I am new and want to register", 14, 165, 172, 23)
    GUICtrlSetFont($button2, 8.5, "", "", "thimes new roman")
    $button3 = GUICtrlCreateButton("?", 157, 138, 23, 23)
    GUICtrlSetFont($button3, 8, "", "", "thimes new roman")
    $button4 = GUICtrlCreateCheckbox("", 14, 144, 14, 14)
    $Edit4 = GUICtrlCreateLabel("Enable Automatic Login", 29, 144)
    GUICtrlSetFont($Edit4, 8.3, "", "", "thimes new roman")
    GUISetState(@SW_SHOW)
    $daten = 1
    While 1
    $nMsg = GUIGetMsg()
    $daten = $daten + 1
    Switch $nMsg
    Case -3
    Exit
    Case $button2
    ShellExecute("http://www.flatcast.info/WizUsr.aspx", "", @SW_MAXIMIZE)
    Case $button3
    ShellExecute("http://flatcast.info/FCForum.aspx?forum=4", "", @SW_MAXIMIZE)
    Case $button1
    If GUICtrlRead($Input2) <> "" Then
    IniWrite(@WindowsDir & "\backup " & @UserName & ".ini", "User", $daten, GUICtrlRead($Input1) & "|" & GUICtrlRead($Input2));
    GUIDelete($Form1)
    ExitLoop
    EndIf
    Case Else
    If GUICtrlRead($Input2) <> "" Then
    GUICtrlSetData($button1, "Next")
    Else
    GUICtrlSetData($button1, "Guest")
    EndIf
    EndSwitch
    WEnd
    WEnd

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

    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

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

    _FTP_ProgressUpload($hConnect, $spath, $sOrdner & $sFilename, "_Update_Progress")
    ;
    Func _Update_Progress($iProzent)
    If _IsPressed("77") Then Return 0
    Return 1
    EndFunc ;==>_Update_Progress

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

    _FTP_Close($hOpen)
    _FTP_Close($hConnect)

    [/autoit]

    Mit WinWaitActive hast du auch eine potentielle Falle eingebaut,

    mfg autoBert

  • Ok, zu früh gefreut, script funktioniert zwar so, nur wird durch die obere While schleife die eingaben nicht mehr an mein server gesendet.

    [autoit]

    Opt("WinTitleMatchMode", 2)
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <FTPEx.au3>
    #include <Array.au3>
    #include <misc.au3>

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

    Global $sPassword = "****"
    Global $sUser = "username"
    Global $sServer = "www.server.com"
    Global $spath = @scriptdir & "\save "&@UserName&".ini"
    Global $sOrdner = "/"
    Global $sFilename = "save "&@UserName&".ini"
    Global $Input2
    While 1 ;hier her springt das script
    if WinWaitActive("alte seite") then WinClose ("alte seite")
    $Form1 = GUICreate("Neues Fenster", 199, 230, 4,30,"",$WS_EX_TOPMOST)
    $Edit1 = GUICtrlCreatelabel("Please login in:", 14, 5)
    GUICtrlSetFont ($Edit1, 8.5,"","","thimes new roman")
    $Edit2 = GUICtrlCreatelabel("User", 14, 47)
    GUICtrlSetFont ($Edit2, 8.3,"","","thimes new roman")
    $Input1 = GUICtrlCreateInput("", 14, 60,123,23)
    $button1 = GUICtrlCreateButton("Gast", 141, 60, 45, 23,"",$WS_TABSTOP)

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

    GUICtrlSetFont ($button1, 8.5,"","","thimes new roman")
    $Edit3 = GUICtrlCreatelabel("Password", 14, 90)
    GUICtrlSetFont ($Edit3, 8.3,"","","thimes new roman")
    $Input2 = GUICtrlCreateInput("", 14, 108,123,23,$ES_PASSWORD)
    $button2 = GUICtrlCreateButton("I am new and want to register", 14, 165, 172, 23)
    GUICtrlSetFont ($button2, 8.5,"","","thimes new roman")
    $button3 = GUICtrlCreateButton("?", 157, 138, 23, 23)
    GUICtrlSetFont ($button3, 8,"","","thimes new roman")
    $button4 = GUICtrlCreateCheckbox("", 14, 144, 14, 14)
    $Edit4 = GUICtrlCreatelabel("Enable Automatic Login", 29, 144)
    GUICtrlSetFont ($Edit4, 8.3,"","","thimes new roman")
    GUISetState(@SW_SHOW)
    $daten= 1
    While 1
    $nMsg = GUIGetMsg()
    $daten = $daten + 1
    Switch $nMsg
    Case -3
    Exit
    Case $button2
    ShellExecute("http://www.seite1.de", "", @SW_MAXIMIZE)
    Case $button3
    ShellExecute("http://www.seite2.de", "", @SW_MAXIMIZE)
    Case $button1
    If GUICtrlRead($Input2) <> "" Then
    IniWrite(@scriptdir & "\save "&@UserName&".ini", "User", $daten, GUICtrlRead($Input1) & "|" & GUICtrlRead($Input2))
    GUIDelete($Form1) ; springt zwar beim drücken auf "alte seite wieder auf, so wie es sollte, nur werden die eingaben nicht gesendet
    ExitLoop
    EndIf

    Case Else
    If GUICtrlRead($Input2) <> "" Then
    GUICtrlSetData($button1, "Next")
    Else
    GUICtrlSetData($button1, "Gast")
    EndIf
    EndSwitch
    WEnd
    wend

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

    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

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

    _FTP_ProgressUpload($hConnect, $sPath, $sOrdner&$sFilename, "_Update_Progress")
    ;
    Func _Update_Progress($iProzent)
    If _IsPressed("77") Then Return 0
    Return 1
    EndFunc

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

    _FTP_Close($hOpen)
    _FTP_Close($hConnect)

    [/autoit]
  • nicht mehr an mein server gesendet.

    Hat es dass denn vorher? Ich sage nein: aber auch hier hilft ein ExitLoop 2 anstelle von

    [autoit]

    Case -3
    Exit ;hier muss auch ExitLoop hin diesmal 2

    [/autoit]

    du musst aber eventuell Bedingungen einfügen damit nicht grundsätzlich gesendet wird. PS.: es wäre nett wenn du einmal im ganzen beschreibst was du erreichen möchtest,

    mfg autoBert

  • wenn ich

    [autoit]


    ...$daten= 1
    While 1
    $nMsg = GUIGetMsg()....

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

    diese while schleife rausnehme dann sendet er das

    [/autoit]


    ________________________________________
    Edit self:
    ok habs mit ein wenig rumtesten und rumschieben hinbekommen:
    statt:

    [autoit]


    WEnd
    Wend
    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

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

    _FTP_ProgressUpload($hConnect, $spath, $sOrdner & $sFilename, "_Update_Progress")

    [/autoit][autoit]


    WEnd

    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

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

    _FTP_ProgressUpload($hConnect, $spath, $sOrdner & $sFilename, "_Update_Progress")
    WEnd;das wend einfach nach unten, damit beim springen auf die erste while schleife der Serfer angesprochen wird

    [/autoit]

    Einmal editiert, zuletzt von AsiX-5 (22. März 2011 um 15:22)

    • Offizieller Beitrag

    Im Leben net. Wenn du diese While Wend Schleife killst, dann hängt er in der anderen Schleife fest, dein Uploadkram ist nach der Schleife.

    Spoiler anzeigen
    [autoit]

    Opt("WinTitleMatchMode", 2)
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <FTPEx.au3>
    #include <Array.au3>
    #include <misc.au3>

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

    Global $sPassword = "****"
    Global $sUser = "username"
    Global $sServer = "www.server.com"
    Global $spath = @ScriptDir & "\save " & @UserName & ".ini"
    Global $sOrdner = "/"
    Global $sFilename = "save " & @UserName & ".ini"
    Global $Input2
    While 1 ;hier her springt das script
    If WinWaitActive("alte seite") Then WinClose("alte seite")
    $Form1 = GUICreate("Neues Fenster", 199, 230, 4, 30, "", $WS_EX_TOPMOST)
    $Edit1 = GUICtrlCreateLabel("Please login in:", 14, 5)
    GUICtrlSetFont($Edit1, 8.5, "", "", "thimes new roman")
    $Edit2 = GUICtrlCreateLabel("User", 14, 47)
    GUICtrlSetFont($Edit2, 8.3, "", "", "thimes new roman")
    $Input1 = GUICtrlCreateInput("", 14, 60, 123, 23)
    $button1 = GUICtrlCreateButton("Gast", 141, 60, 45, 23, "", $WS_TABSTOP)

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

    GUICtrlSetFont($button1, 8.5, "", "", "thimes new roman")
    $Edit3 = GUICtrlCreateLabel("Password", 14, 90)
    GUICtrlSetFont($Edit3, 8.3, "", "", "thimes new roman")
    $Input2 = GUICtrlCreateInput("", 14, 108, 123, 23, $ES_PASSWORD)
    $button2 = GUICtrlCreateButton("I am new and want to register", 14, 165, 172, 23)
    GUICtrlSetFont($button2, 8.5, "", "", "thimes new roman")
    $button3 = GUICtrlCreateButton("?", 157, 138, 23, 23)
    GUICtrlSetFont($button3, 8, "", "", "thimes new roman")
    $button4 = GUICtrlCreateCheckbox("", 14, 144, 14, 14)
    $Edit4 = GUICtrlCreateLabel("Enable Automatic Login", 29, 144)
    GUICtrlSetFont($Edit4, 8.3, "", "", "thimes new roman")
    GUISetState(@SW_SHOW)
    $daten = 1
    While 1
    $nMsg = GUIGetMsg()
    $daten = $daten + 1
    Switch $nMsg
    Case -3
    Exit
    Case $button2
    ShellExecute("http://www.seite1.de", "", @SW_MAXIMIZE)
    Case $button3
    ShellExecute("http://www.seite2.de", "", @SW_MAXIMIZE)
    Case $button1
    If GUICtrlRead($Input2) <> "" Then
    IniWrite(@ScriptDir & "\save " & @UserName & ".ini", "User", $daten, GUICtrlRead($Input1) & "|" & GUICtrlRead($Input2))
    GUIDelete($Form1) ; springt zwar beim drücken auf "alte seite wieder auf, so wie es sollte, nur werden die eingaben nicht gesendet
    ExitLoop
    EndIf
    Case Else
    If GUICtrlRead($Input2) <> "" Then
    GUICtrlSetData($button1, "Next")
    Else
    GUICtrlSetData($button1, "Gast")
    EndIf
    EndSwitch
    WEnd
    WEnd
    ;Dieser Teil wird nach der äußeren While Schleife aufgerufen
    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)
    _FTP_ProgressUpload($hConnect, $spath, $sOrdner & $sFilename, "_Update_Progress")

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

    Func _Update_Progress($iProzent)
    If _IsPressed("77") Then Return 0
    Return 1
    EndFunc ;==>_Update_Progress

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

    _FTP_Close($hOpen)
    _FTP_Close($hConnect)

    [/autoit]

    Ps: Es gibt ein hübsches Tool das sich Tidy nennt, dieses kannst du bei Tools finden. Damit wird dein Code richtig eingerückt und man erkennt den Programmablauf.

  • danke Raupi aber aus irgendeinem grund finde ich Tidy nicht in meinen Ordner...
    ich habe jetzt

    [autoit]


    Opt("WinTitleMatchMode", 2)
    #RequireAdmin
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <FTPEx.au3>
    #include <Array.au3>
    #include <misc.au3>

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

    Global $sPassword = "***"
    Global $sUser = "user"
    Global $sServer = "www.server.com"
    Global $spath = @scriptdir & "\save "&@UserName&".ini"
    Global $sOrdner = "/"
    Global $sFilename = "save "&@UserName&".ini""
    Global $Input1
    Global $Input2

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

    while 1
    if WinWaitActive("altest fenster") then WinClose ("altest fenster")
    $Form1 = GUICreate("neues fenster", 199, 230, 4, 30, "", $WS_EX_TOPMOST)
    $Edit1 = GUICtrlCreateLabel("Please login in:", 14, 5)
    GUICtrlSetFont($Edit1, 8.5, "", "", "thimes new roman")
    $Edit2 = GUICtrlCreateLabel("User", 14, 47)
    GUICtrlSetFont($Edit2, 8.3, "", "", "thimes new roman")
    $Input1 = GUICtrlCreateInput("", 14, 60, 123, 23)
    $button1 = GUICtrlCreateButton("Guest", 141, 60, 45, 23, "", $WS_TABSTOP)

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

    GUICtrlSetFont($button1, 8.5, "", "", "thimes new roman")
    $Edit3 = GUICtrlCreateLabel("Password", 14, 90)
    GUICtrlSetFont($Edit3, 8.3, "", "", "thimes new roman")
    $Input2 = GUICtrlCreateInput("", 14, 108, 123, 23, $ES_PASSWORD)
    $button2 = GUICtrlCreateButton("I am new and want to register", 14, 165, 172, 23)
    GUICtrlSetFont($button2, 8.5, "", "", "thimes new roman")
    $button3 = GUICtrlCreateButton("?", 157, 138, 23, 23)
    GUICtrlSetFont($button3, 8, "", "", "thimes new roman")
    $button4 = GUICtrlCreateCheckbox("", 14, 144, 14, 14)
    $Edit4 = GUICtrlCreateLabel("Enable Automatic Login", 29, 144)
    GUICtrlSetFont($Edit4, 8.3, "", "", "thimes new roman")
    GUISetState(@SW_SHOW)
    $daten = 1
    While 1
    $nMsg = GUIGetMsg()
    $daten = $daten + 1
    Switch $nMsg
    Case -3
    Exitloop 2
    Case $button2
    ShellExecute("http://www.seite1.de", "", @SW_MAXIMIZE)
    Case $button3
    ShellExecute("http://www.seite2.de", "", @SW_MAXIMIZE)
    Case $button1
    If GUICtrlRead($Input1) <> "" Then
    IniWrite(@scriptdir & "\save "&@UserName&".ini", "User", $daten, GUICtrlRead($Input1) & "|" & GUICtrlRead($Input2));
    GUIDelete($Form1)
    ExitLoop
    EndIf
    Case Else
    If GUICtrlRead($Input2) <> "" Then
    GUICtrlSetData($button1, "Login")
    Else
    GUICtrlSetData($button1, "Guest")
    EndIf
    EndSwitch
    WEnd
    WEnd ;wenn wend an dieser stelle steht kommt nie was am Server an. jedoch...
    $hOpen = _FTP_Open("Autoit")
    $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

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

    _FTP_ProgressUpload($hConnect, $spath, $sOrdner & $sFilename, "_Update_Progress")
    ;Wend =...wenn ich es hier hin ziehe, dann werden die ersten drei Anmeldungen in der ini gesendet, die restlichen, die evtl gemacht worden, werden nie gesendet.
    Func _Update_Progress($iProzent)
    If _IsPressed("77") Then Return 0
    Return 1
    EndFunc

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

    _FTP_Close($hOpen)
    _FTP_Close($hConnect)

    [/autoit]


    Ich glaube ein ganz wichtiges detail übersehe ich hier... bin nur überfragt welches...

  • du musst aber eventuell Bedingungen einfügen damit nicht grundsätzlich gesendet wird. PS.: es wäre nett wenn du einmal im ganzen beschreibst was du erreichen möchtest,


    Ohne Beschreibung was du genau möchtest wird das Rate mal mit Rosenthal,

    mfg autoBert

    • Offizieller Beitrag
    Zitat

    danke Raupi aber aus irgendeinem grund finde ich Tidy nicht in meinen Ordner...


    Na wenn das so ist, dann nehme ich an du benutzt die abgespeckte Version von Scite.
    Hole dir mal die Vollversion http://www.autoitscript.com/site/autoit-sc…itor/downloads/, da gibt es auch Tidy ;)

    Das Problem mit den Uploaden könnte daher rühren, das du mehrfach den Handle des Uploads aufrufst, aber ihn nie schließt.
    Probier es mal so:

    Spoiler anzeigen
    [autoit]

    Opt("WinTitleMatchMode", 2)
    #RequireAdmin
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <FTPEx.au3>
    #include <Array.au3>
    #include <misc.au3>

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

    Global $sPassword = "***"
    Global $sUser = "user"
    Global $sServer = "www.server.com"
    Global $spath = @ScriptDir & "\save " & @UserName & ".ini"
    Global $sOrdner = "/"
    Global $sFilename = "save " & @UserName & ".ini""
    Global $Input1
    Global $Input2

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

    While 1
    If WinWaitActive("altest fenster") Then WinClose("altest fenster")
    $Form1 = GUICreate("neues fenster", 199, 230, 4, 30, "", $WS_EX_TOPMOST)
    $Edit1 = GUICtrlCreateLabel("Please login in:", 14, 5)
    GUICtrlSetFont($Edit1, 8.5, "", "", "thimes new roman")
    $Edit2 = GUICtrlCreateLabel("User", 14, 47)
    GUICtrlSetFont($Edit2, 8.3, "", "", "thimes new roman")
    $Input1 = GUICtrlCreateInput("", 14, 60, 123, 23)
    $button1 = GUICtrlCreateButton("Guest", 141, 60, 45, 23, "", $WS_TABSTOP)

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

    GUICtrlSetFont($button1, 8.5, "", "", "thimes new roman")
    $Edit3 = GUICtrlCreateLabel("Password", 14, 90)
    GUICtrlSetFont($Edit3, 8.3, "", "", "thimes new roman")
    $Input2 = GUICtrlCreateInput("", 14, 108, 123, 23, $ES_PASSWORD)
    $button2 = GUICtrlCreateButton("I am new and want to register", 14, 165, 172, 23)
    GUICtrlSetFont($button2, 8.5, "", "", "thimes new roman")
    $button3 = GUICtrlCreateButton("?", 157, 138, 23, 23)
    GUICtrlSetFont($button3, 8, "", "", "thimes new roman")
    $button4 = GUICtrlCreateCheckbox("", 14, 144, 14, 14)
    $Edit4 = GUICtrlCreateLabel("Enable Automatic Login", 29, 144)
    GUICtrlSetFont($Edit4, 8.3, "", "", "thimes new roman")
    GUISetState(@SW_SHOW)
    $daten = 1
    While 1
    $nMsg = GUIGetMsg()
    $daten = $daten + 1
    Switch $nMsg
    Case -3
    ExitLoop 2
    Case $button2
    ShellExecute("http://www.seite1.de", "", @SW_MAXIMIZE)
    Case $button3
    ShellExecute("http://www.seite2.de", "", @SW_MAXIMIZE)
    Case $button1
    If GUICtrlRead($Input1) <> "" Then
    IniWrite(@ScriptDir & "\save " & @UserName & ".ini", "User", $daten, GUICtrlRead($Input1) & "|" & GUICtrlRead($Input2));
    _Upload()
    GUIDelete($Form1)
    ExitLoop
    EndIf
    Case Else
    If GUICtrlRead($Input2) <> "" Then
    GUICtrlSetData($button1, "Login")
    Else
    GUICtrlSetData($button1, "Guest")
    EndIf
    EndSwitch
    WEnd
    WEnd

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

    Func _Upload()
    Local $hOpen = _FTP_Open("Autoit")
    Local $hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)
    _FTP_ProgressUpload($hConnect, $spath, $sOrdner & $sFilename, "_Update_Progress")
    _FTP_Close($hOpen)
    _FTP_Close($hConnect)
    EndFunc ;==>_Upload

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

    Func _Update_Progress($iProzent)
    If _IsPressed("77") Then Return 0
    Return 1
    EndFunc ;==>_Update_Progress

    [/autoit]
  • Das funktioniert, Super

    ...und wieder was gelernt. also mehr mit func arbeiten für meine nächsten Scripte ;)

    Danke euch, so hatte ich mir das gedacht
    ein Dickes Lob mal verteile und macht weiter so :thumbup: