nf67 1 Posted October 1, 2010 (edited) Hi there,I've written this script to demonstrate the problem, it generates a GUI of which the progressbar should update once the upload is started. Instead, the GUI crashes once u is pressed and the upload is started.EDIT: Updated with FTP details!expandcollapse popup#include <FTPEx.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> $GUI=GUICreate("Press U",250,20) $ProgressBar = GUICtrlCreateProgress(0,0,250,20) $Progress = "" GUISetState(@SW_SHOW) HotKeySet("u","Upload") $FilePath = "C:\10mb.bin" ;Download a 10MB dummy file at http://au3.comyr.com/10MB.bin While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd Func Upload() WinSetTitle("Press U","","Upload @ 0%") $Open = _FTP_Open("Progress FTP") $Connect = _FTP_Connect($Open,"ftp.au3.comyr.com","a7800447","autoit3") If $Connect = 0 Then MsgBox(0,"Error","Couldn't connect") Else $Upload = _FTP_ProgressUpload($Connect, $FilePath, "/public_html/Uploaded-10MB.bin", "Update") EndIf EndFunc Func Update($Percentage) GUICtrlSetData($ProgressBar, $Percentage) WinSetTitle("Upload @ ","","Upload @ " & $Percentage & "%") If $Percentage = 100 Then GUIDelete($GUI) MsgBox(0,"Done!","Upload completed.") Exit Else Return 1 EndIf EndFuncWhat's wrong :-/ ?Thanks in advance! Edited October 2, 2010 by nf67 Share this post Link to post Share on other sites
nf67 1 Posted October 2, 2010 (edited) As it turns out, there's nothing wrong with the script. It works fine when the ftp.au3.comyr.com server is used. Apparently it just doesn't play nice with my own server, it only generates a 0 byte file (named correctly though) and crashes, any suggestions? Edited October 2, 2010 by nf67 Share this post Link to post Share on other sites
Tvern 11 Posted October 2, 2010 When I write a program using FTP I usually add an alternative method using FTP.exe (standard in wondows) I try to use autoit's FTP functions, but if I come across an error I write a batch file that I run through FTP.exe. Share this post Link to post Share on other sites
nf67 1 Posted October 2, 2010 FTP.exe? Could you please elaborate? How can I use this? Share this post Link to post Share on other sites
Tvern 11 Posted October 2, 2010 I've gotta go now, but run FTP.exe from the start->run menu, then type help. If it's not clear I'll post an example when I return. Share this post Link to post Share on other sites