mads3n Posted July 23, 2007 Share Posted July 23, 2007 (edited) a year ago i made this autoit script that could upload a file to a folder on my ftp server. Now i need to change it a bit, and it just wont work.. im really confused :/its not a very long script(im using this ftp udf FTP )heres the code:expandcollapse popup#include <GuiConstants.au3> #include <array.au3> #include <file.au3> #include "ftp.au3" $mainwindow = GuiCreate("billed ændring", 400, 200) $oobutton = GUICtrlCreateButton ( "Choose file", 20, 5, 180, 60, 0x0300) $gembutton = GUICtrlCreateButton ( "Upload", 200, 5, 180, 60, 0x0300) GuiCtrlCreateLabel("Filnavn:", 10, 80) $label = GuiCtrlCreateLabel("Ingen fil valgt", 55, 80, 345, 40) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ;Exit the script Exit Case $msg = $oobutton $navn = FileOpenDialog ("Vælg fil:", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "(*.jpg)") If @error Then ContinueLoop GUICtrlSetData($label, $navn) $username = '***' $pass = '***' $server = '***' Global $INTERNET_FLAG_PASSIVE = 0x08000000 Global $FTP_TRANSFER_TYPE_UNKNOWN = 0x00000000 Global $FTP_TRANSFER_TYPE_ASCII = 0x00000001 Global $FTP_TRANSFER_TYPE_BINARY = 0x00000002 Case $msg = $gembutton Dim $szDrive, $szDir, $szFName, $szExt $TestPath = _PathSplit($navn, $szDrive, $szDir, $szFName, $szExt) GUICtrlSetData($label, $szFName& $szExt & " - bliver nu uploadet") $Open = _FTPOpen('FTPm') $Conn = _FTPConnect($Open, $server, $username, $pass, 21, 1, $INTERNET_FLAG_PASSIVE) $Ftpp = _FtpPutFile($Conn, $navn, 'FF/'& $szFName& $szExt, $FTP_TRANSFER_TYPE_BINARY) $Ftpc = _FTPClose($Open) MsgBox(0,"Filen er uploadet","Filen blev uploadet.. Du kan nu finde den på hjemmesiden!") GUICtrlSetData($label, $szFName& $szExt & " - kan nu findes på hjemmesiden") EndSelect WEndwhen i use the script nothing happends :/ Edited July 23, 2007 by mads3n Mads3n.dk Link to comment Share on other sites More sharing options...
Developers Jos Posted July 23, 2007 Developers Share Posted July 23, 2007 (edited) You need to use DllOpen() for WinInet.dll now.... just search and there should be many hits .... Edited July 23, 2007 by JdeB 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. Link to comment Share on other sites More sharing options...
mads3n Posted July 23, 2007 Author Share Posted July 23, 2007 You need to use DllOpen() for WinInet.dll now.... just search and there should be many hits ....thanks a lot.. Mads3n.dk 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