Sign in to follow this  
Followers 0
russell

Syntax Check shows errors but it work?

4 posts in this topic

#1 ·  Posted (edited)

ok the script works as some of it came straight from the help but it returns errors. ??? i studied it for lik 2 hours and cant findout why. I think i just need a fresh pair of eyes. LOL its like wheres waldo...."can you find me," says error code :2

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\login.kxf
$Form2 = GUICreate("User Verification", 251, 134, -1, -1)
GUISetIcon("C:\Icons\ironman_win\ironman win\M III.ico", -1)
$user = GUICtrlCreateInput("", 120, 40, 121, 21)
$Password = GUICtrlCreateInput("", 120, 72, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$ButtonOk = GUICtrlCreateButton("&OK", 86, 104, 75, 25, $BS_NOTIFY)
$ButtonCancel = GUICtrlCreateButton("&Cancel", 167, 104, 75, 25, $BS_NOTIFY)
$PassLabel = GUICtrlCreateLabel("Password", 24, 76, 74, 18, 0)
GUICtrlSetFont($PassLabel, 8, 800, 2, "Blade Runner Movie Font")
$Label1 = GUICtrlCreateLabel("Username", 24, 40, 73, 18)
GUICtrlSetFont($Label1, 8, 800, 2, "Blade Runner Movie Font")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $ButtonOk
            #include <FTPEx.au3>
            $server = 'myftpserver'
            $username = GUICtrlRead($user)
            $pass = GUICtrlRead($Password)
            $aFile = "myfile.txt"
            $Open = _FTP_Open('MyAccount')
            $Conn = _FTP_Connect($Open, $server, $username, $pass)
            ;$afileopen = _FTP_FileOpen("myfile.txt")
            ;$ClientsAuth = _FTP_FileRead($afileopen)
            $FileSize = _FTP_FileGetSize($Conn, $aFile)
            
            ExitLoop
            
        Case $ButtonCancel
            Exit
            
    EndSwitch
WEnd

Also i tried (as you can see they are notes now) to make it save the content of the file as a variable but me failed :graduated:

Edited by russell

muppet hands are so soft :)

Share this post


Link to post
Share on other sites



"#include <FTPEx.au3>" should not be placed inside a loop.

Share this post


Link to post
Share on other sites

"#include <FTPEx.au3>" should not be placed inside a loop.

Alrighty, i just move that lil sucker to the top of the page. and run it agin

muppet hands are so soft :)

Share this post


Link to post
Share on other sites

Nice! that was it. Now why counldn't i see that :graduated: . Got any hints about the file read? I have done it in other script perfectly but not in an ftp instance.


muppet hands are so soft :)

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  
Followers 0