GtaSpider Posted May 8, 2007 Share Posted May 8, 2007 Hello! uhm, does it works with 3.2.4.0 rc1? i think not, cause i cant conect to servers. e.g. this doesnt work: #include <GuiConstants.au3> #include "..\Include\OFTP.au3" Dim $Handle, $DllRect $server = 'ftp.mozilla.org' $username = 'anonymous' $pass = 'anonymous' $dllhandle = DllOpen('wininet.dll') $Open = _FTPOpen('MyFTP Control',0) If @error Then Failed("Open") $Conn = _FTPConnect($Open, $server, $username, $pass, 1) If @error Then Failed("Connect") $Ftpp = _FtpGetFile($Conn, "/pub/mozilla.org/firefox/releases/2.0.0.3/win32/en-US/Firefox Setup 2.0.0.3.exe", @ScriptDir&"\FirefoxSetup2003.exe", $INTERNET_FLAG_PASSIVE, 0) If $Ftpp = 0 Then Failed("Could not get") $Ftpc = _FTPClose($Open) _FTPClose ($Open) DllClose($dllhandle) Func Failed($error) MsgBox(48, 'Error', $error) Exit EndFunc does anybody know why? @w0uter: sry, but i must it say again: very nice UDF ;-) Mfg / best Regards Spider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
Shevilie Posted May 14, 2007 Share Posted May 14, 2007 Trolling for UDF list Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
eyegeegeewhy Posted May 17, 2007 Share Posted May 17, 2007 Does this still work. Could some one supply a simple example script Link to comment Share on other sites More sharing options...
Leoj Posted May 23, 2007 Share Posted May 23, 2007 Sorry if this is a bump but I can't get this to work. Wrong version of autoit? Link to comment Share on other sites More sharing options...
dWade Posted June 22, 2007 Share Posted June 22, 2007 <snip>$dllhandle = DllOpen('wininet.dll')$Open = _FTPOpen('MyFTP Control',0)</snip>Would some kind soul please explain to this dumb newbie what goes in place of 'MyFTP Control' in the above code? Is this an IP address or what? I'd really appreciate the help. --- dWade Link to comment Share on other sites More sharing options...
Zedna Posted June 22, 2007 Share Posted June 22, 2007 Would some kind soul please explain to this dumb newbie what goes in place of 'MyFTP Control' in the above code? Is this an IP address or what? I'd really appreciate the help. --- dWadeIt's probably FTP session name. You can place there whatever text which will be unique among another FTP sessions (probably in your script) if any other exists.I'm not 100% sure about this but it will be very close to right statement. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Swimming_Bird Posted June 23, 2007 Share Posted June 23, 2007 are these functions still useable? particularly in vista? because i'm not able to get them to work. Link to comment Share on other sites More sharing options...
xcxooxl Posted June 26, 2007 Share Posted June 26, 2007 how do i use the function FTPmakedir? can sombody please put an example? Link to comment Share on other sites More sharing options...
Zedna Posted June 26, 2007 Share Posted June 26, 2007 how do i use the function FTPmakedir?can sombody please put an example?Read all posts and links in this topic. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
dWade Posted June 26, 2007 Share Posted June 26, 2007 It's probably FTP session name. You can place there whatever text which will be unique among another FTP sessions (probably in your script) if any other exists.I'm not 100% sure about this but it will be very close to right statement.Thanks Zedna; I'm still confused, but then that seems to be a perpetual state with me. I do appreciate your helpful response. --- dWade. Link to comment Share on other sites More sharing options...
xcxooxl Posted June 27, 2007 Share Posted June 27, 2007 i rode them all and i cant seem to find how.. Link to comment Share on other sites More sharing options...
bob.frew Posted July 18, 2007 Share Posted July 18, 2007 Hi people,can anyone help please. This is my first attempt at using FTP.au3 and I just can't get it to go.Using the sample code as a starting point I have tried substituting my info without success.I normally use Filezilla for FTP which works fine - see attached image of site settings it is using.Have tried using port 0 and 21 and assorted guesses as to what some of the other parameters might be.I get a value back from _FTPOpen but then the connect fails,I am hoping this is something silly I have done / not done.Please see attached code.BobCODE; first attempt 17/07/2007Opt ("ExpandEnvStrings", 0)Opt ("ExpandVarStrings", 1)Opt ("MustDeclareVars", 1)#include <GUIConstants.au3>#include <FTP.au3>; -----------------------------------------------------Dim $server = 'upload.ntlworld.com'Dim $username = 'robert.frew'Dim $pass = 'mypasswd' ; not the real oneDim $port = 21;Dim $Open = _FTPOpen('MyFTP')Dim $Conn = _FTPConnect($Open, $server, $username, $pass, $port); $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/somedir/Example.exe')Dim $Ftpp = _FtpPutFile($Conn, 'C:\xmltv\web\listings.htm', '/tvguide.htm')Dim $Ftpc = _FTPClose($Open)MsgBox(0,"Trial FTP of HTM File", "$Open = " & $Open & @CRLF & "$Conn = " & $Conn & @CRLF & "$Ftpp = " & $Ftpp & @CRLF & "$Ftpc = " & $Ftpc)Exit AutoIt is great - leave me alone and I'll play for hours Link to comment Share on other sites More sharing options...
Zedna Posted July 18, 2007 Share Posted July 18, 2007 (edited) Hi people, can anyone help please. This is my first attempt at using FTP.au3 and I just can't get it to go. Using the sample code as a starting point I have tried substituting my info without success. I normally use Filezilla for FTP which works fine - see attached image of site settings it is using. Have tried using port 0 and 21 and assorted guesses as to what some of the other parameters might be. I get a value back from _FTPOpen but then the connect fails, I am hoping this is something silly I have done / not done. Please see attached code. Bob It was said before: There was internal change in Autoit's DllCall() so you must use some workaround, for example this one with explicit DllOpen/DllClose: ... $dllhandle = DllOpen('wininet.dll') $Open = _FTPOpen ('MyFTP Control') ... _FTPClose ($Open) DllClose($dllhandle) Edited July 18, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
MrCreatoR Posted July 19, 2007 Share Posted July 19, 2007 (edited) Greate UDFs!! It would be even more greate if someone will make function for getting all files in certain dir - something like _FtpGetFiles() - and it returns array/string with all files in some folder on Ftp. Thanks. Edited July 19, 2007 by MsCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
inov8iv Posted July 19, 2007 Share Posted July 19, 2007 (edited) Im trying to use FTP.au3 to _FtpPutFile and cannot seem to get it to work. Is anyone working on fixing wouter's FTP.au3, so everyone who uses FTP will be happy? #include <Ftp.au3> Const $FTP_TRANSFER_TYPE_ASCII = 0x01 Const $FTP_TRANSFER_TYPE_BINARY = 0x02 Const $INTERNET_FLAG_NO_CACHE_WRITE = 0x4000000 $ftp_flags = $FTP_TRANSFER_TYPE_BINARY + $INTERNET_FLAG_NO_CACHE_WRITE $dllhandle = DllOpen('wininet.dll') $server = 'ftp.site.com' $username = 'username' $pass = 'password' $Open = _FTPOpen('ftp') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, @ScriptDir & 'testfile.txt', '/somedir/testfile.txt',$ftp_flags) $Ftpc = _FTPClose($Open) DllClose($dllhandle) Thanks in Advance Edited July 19, 2007 by inov8iv Link to comment Share on other sites More sharing options...
bob.frew Posted July 19, 2007 Share Posted July 19, 2007 It was said before: There was internal change in Autoit's DllCall() so you must use some workaround, for example this one with explicit DllOpen/DllClose: ... $dllhandle = DllOpen('wininet.dll') $Open = _FTPOpen ('MyFTP Control') ... _FTPClose ($Open) DllClose($dllhandle) Hi Zedna many thanks for that. I have it working now. I have NOW read your relevant post. sorry I missed it on my zoom through the pages. If including these DllOpen/Close lines can't be included in the _FTPOpen/Close functions then maybe the example.au3 could be amended to include them. Cheers Bob AutoIt is great - leave me alone and I'll play for hours Link to comment Share on other sites More sharing options...
Zedna Posted July 19, 2007 Share Posted July 19, 2007 Greate UDFs!!It would be even more greate if someone will make function for getting all files in certain dir - something like _FtpGetFiles() - and it returns array/string with all files in some folder on Ftp.Thanks.Read all posts in this topic.Especially look here Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mads3n Posted July 24, 2007 Share Posted July 24, 2007 is it possible to get the ftpPutFile to overwrite existing files with the same name as the one im trying to upload? Mads3n.dk Link to comment Share on other sites More sharing options...
lordlol Posted August 25, 2007 Share Posted August 25, 2007 hey guys! i did everything u sayd in all pages and i get the following error if i start ftp_progress.au3: "Line 422 (File "C:/......") $l_DllStruct = DllstructCreate($str) $l_DllStruct = ^ ERROR Error:Unknown function name. Thank you in advance, lordlol Link to comment Share on other sites More sharing options...
Zedna Posted August 25, 2007 Share Posted August 25, 2007 hey guys!i did everything u sayd in all pages and i get the following error if i start ftp_progress.au3:"Line 422 (File "C:/......")$l_DllStruct = DllstructCreate($str)$l_DllStruct = ^ ERRORError:Unknown function name.Thank you in advance,lordlolYou are probably using VERY old AutoIt.Download and instal latest one. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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