Chinasmoker Posted November 11, 2007 Posted November 11, 2007 the _ftpconnect returned 0 in My script,but ftp server is useable absolutely,and ftp://username:password@IP in IE can display files of ftp server,below my script CODE#include <GUIConstants.au3>#include <ftp.au3>#NoTrayIcon#Region ### START Koda GUI section ### Form=$Form1 = GUICreate("热力游戏菜单更新", 408, 448, 193, 115)$Label1 = GUICtrlCreateLabel("更新到:", 16, 368, 52, 17)$input = GUICtrlCreateInput("", 72, 360, 241, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))$Button1 = GUICtrlCreateButton("浏览", 352, 360, 43, 25, 0)$Progress1 = GUICtrlCreateProgress(16, 392, 382, 16)GUICtrlSetData(-1, 25)$Pic1 = GUICtrlCreatePic(@ScriptDir & "\1.jpg", 0, 0, 404, 348, BitOR($SS_NOTIFY,$WS_GROUP))$updata = GUICtrlCreateButton("开始更新", 16, 416, 75, 25, 0)$rate = GUICtrlCreateInput ("",100,416,100,21, BitOR($ES_AUTOHSCROLL,$ES_READONLY), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))$Button2 = GUICtrlCreateButton("退出", 344, 416, 51, 25, 0)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###$server = ("192.168.0.250")$username = ("jswb")$pass = ("88362606")While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $updatadir = FileSelectFolder ("请选择目录","") GUICtrlSetData ($input,$updatadir) Case $updata Connect() EndSwitchWEndFunc Connect() $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) MsgBox (0,"",$Conn) EndFunc Thanks Zedna and all guys One is never too old to learn
Zedna Posted November 11, 2007 Posted November 11, 2007 You forgot $dllhandle = DllOpen('wininet.dll') before _FTPOpen() Resources UDF ResourcesEx UDF AutoIt Forum Search
Chinasmoker Posted November 11, 2007 Author Posted November 11, 2007 You forgot $dllhandle = DllOpen('wininet.dll') before _FTPOpen()appreciate your help, I will finish it ,This's beutiful night... One is never too old to learn
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now