Jump to content
Sign in to follow this  
mihaim1980

A problem

Recommended Posts

mihaim1980

I maked a application using this example:http://www.autoitscript.com/forum/index.php?showtopic=12473 and I want run this application,this get stuck.How to solve this problem?

The source-code:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <FTP.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("FTP Uploader", 288, 139, 160, 124)
GUISetBkColor(0x008000)
$Input1 = GUICtrlCreateInput("", 72, 16, 169, 21)
$Server = GUICtrlCreateLabel("Server:", 24, 16, 38, 17)
$Input2 = GUICtrlCreateInput("", 72, 40, 169, 21)
$Label1 = GUICtrlCreateLabel("Username:", 16, 40, 55, 17)
$Input3 = GUICtrlCreateInput("", 72, 64, 169, 21)
$Label2 = GUICtrlCreateLabel("Password:", 16, 64, 53, 17)
$Input4 = GUICtrlCreateInput("", 72, 88, 169, 21)
$Label3 = GUICtrlCreateLabel("File to upload:", 0, 88, 70, 17)
$Button1 = GUICtrlCreateButton("Connect ", 0, 112, 81, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("About", 208, 112, 73, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Upload", 104, 112, 81, 25, $WS_GROUP)
GUISetState(@SW_SHOW)


$server = $Input1
$username = $Input2
$pass = $Input3

$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
$Ftpp = _FtpPutFile($Conn, $Input4)
$Ftpc = _FTPClose($Open)

$about=MsgBox(64,"About","FTP Uploader" & @crlf & "by mihaim1980")
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Button1
        $Conn
    Case $Button3
        $Ftpp
        Case $Button2
        $about
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

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.