vaibhavs Posted May 18, 2007 Posted May 18, 2007 Hi,Client : XP Prof (Firewall, Antivirus Disabled)Server: FedoraCore4 in local lanI have copied the FTP.AU3 from this link http://www.autoitscript.com/forum/index.php?showtopic=12473to this location : C:\Program Files\AutoIt3\IncludeThe following script does not work. No error message either.I have tried to upload the script using FTPEx and it work fine.But not via AutoIt3 script.I have searched a lot on this forum, but could not comeup with any solution.Please help!!!!ThxVai#include <GUIConstants.au3> #include <INet.au3> #include <ftp.au3> $server = '192.168.1.4' $username = 'root' $pass = 'mypassword' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\scrshot090.JPG', '/root/ZZZZZZZ.JPG') $Ftpc = _FTPClose($Open) msgbox(16, "Status", "FTP Done")
vaibhavs Posted May 18, 2007 Author Posted May 18, 2007 Another observation (if it helps), the msgbox appears as soon as I press F5. Looks like the script does not even attempt to connect to 192.168.1.4. Thx
Richard Robertson Posted May 18, 2007 Posted May 18, 2007 You don't need to include GUIConstants or IE UDFs because you aren't calling them. I'm really not sure what would be wrong with that script though, unless the name/password was wrong and the connection was just rejected.
Developers Jos Posted May 18, 2007 Developers Posted May 18, 2007 need to load the Dll first ..... Search should give you many hits since it has been asked many times... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Kip Posted May 18, 2007 Posted May 18, 2007 (edited) 192.168.1.4 is someone else in your network, isn't? 192.168.1.1 is the default of linksys Edited May 18, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Rick Posted May 18, 2007 Posted May 18, 2007 (edited) you need two addional lines... #include <GUIConstants.au3> #include <INet.au3> #include <ftp.au3> $Dll=DllOpen("Wininet.dll") $server = '192.168.1.4' $username = 'root' $pass = 'mypassword' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'scrshot090.JPG', '/root/ZZZZZZZ.JPG') $Ftpc = _FTPClose($Open) DllClose($Dll) msgbox(16, $Conn, "FTP Done") altho $conn returns 0 in this example which probably means $server, or $username, or $pass is wrong. Edited May 18, 2007 by Rick Who needs puzzles when we have AutoIt!!
vaibhavs Posted May 18, 2007 Author Posted May 18, 2007 Bingo!!!! It worked. I was missing the DLL calls. It was not mentioned in the example script. Hence I lost on it. Thank you Rick for your help. Really appreciate it. cheers, Vai
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