Jump to content
Sign in to follow this  


Recommended Posts


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

#include <GUIConstants.au3>

#include <ftp.au3>


#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)


#EndRegion ### END Koda GUI section ###

$server = ("")

$username = ("jswb")

$pass = ("88362606")

While 1

$nMsg = GUIGetMsg()

Switch $nMsg



Case $Button1

$updatadir = FileSelectFolder ("请选择目录","")

GUICtrlSetData ($input,$updatadir)

Case $updata




Func Connect()

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

MsgBox (0,"",$Conn)


Thanks Zedna and all guys

One is never too old to learn

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.