Homepage Backup ?

  • Hallo Leute ist es möglich ein programm zu schreiben welches ein anderes programm (im selben ordner , ein ftp programm) STARTET SICH DORT GLEICH EINLOGGT(MIT DATEN DIE MAN BEIM ERSTEN PROGRAMMSTART EINGIBT UND IN NER INI GESPEICHERT WERDEN)
    sucht einen bestimmten ordner (auch mit input und ini datei)und downloadet diesen in ein (auch mit input festlegaberem und in ner ini gespeichertem)verzeichnis und erstezt den bereits vorhandenen ordner mit dem neuen

    also wäre sowas möglich wenn ja mache ich heute abend (bin grade im i-net-cafe)
    wenn ich wieder zuhause bin die ersten versuche?

  • da sind Funktionen für FTP-Download/Upload etc drinne

    Spoiler anzeigen
    [autoit]


    Dim $dll ;var for handle to wininet.dll
    ;===============================================================================
    ;
    ; Function Name: _FTPOpen()
    ; Description: Opens an FTP session.
    ; Parameter(s): $s_Agent - Random name. ( like "myftp" )
    ; $l_AccessType - I dont got a clue what this does.
    ; $s_ProxyName - ProxyName.
    ; $s_ProxyBypass - ProxyByPasses's.
    ; $l_Flags - Special flags.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - Returns an indentifier.
    ; On Failure - 0 and sets @ERROR
    ; Author(s): Wouter van Kesteren.
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPOpen($s_Agent, $l_AccessType = 1, $s_ProxyName = '', $s_ProxyBypass = '', $l_Flags = 0)
    $dll = DllOpen("wininet.dll")
    Local $ai_InternetOpen = DllCall('wininet.dll', 'long', 'InternetOpen', 'str', $s_Agent, 'long', $l_AccessType, 'str', $s_ProxyName, 'str', $s_ProxyBypass, 'long', $l_Flags)
    If @error OR $ai_InternetOpen[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_InternetOpen[0]

    EndFunc ;==> _FTPOpen()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPConnect()
    ; Description: Connects to an FTP server.
    ; Parameter(s): $l_InternetSession - The Long from _FTPOpen()
    ; $s_ServerName - Server name/ip.
    ; $s_Username - Username.
    ; $s_Password - Password.
    ; $i_ServerPort - Server port ( 0 is default (21) )
    ; $l_Service - I dont got a clue what this does.
    ; $l_Flags - Special flags.
    ; $l_Context - I dont got a clue what this does.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - Returns an indentifier.
    ; On Failure - 0 and sets @ERROR
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPConnect($l_InternetSession, $s_ServerName, $s_Username, $s_Password, $i_ServerPort = 0, $l_Service = 1, $l_Flags = 0, $l_Context = 0)

    Local $ai_InternetConnect = DllCall('wininet.dll', 'long', 'InternetConnect', 'long', $l_InternetSession, 'str', $s_ServerName, 'int', $i_ServerPort, 'str', $s_Username, 'str', $s_Password, 'long', $l_Service, 'long', $l_Flags, 'long', $l_Context)
    If @error OR $ai_InternetConnect[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_InternetConnect[0]

    EndFunc ;==> _FTPConnect()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPPutFile()
    ; Description: Puts an file on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_LocalFile - The local file.
    ; $s_RemoteFile - The remote Location for the file.
    ; $l_Flags - Special flags.
    ; $l_Context - I dont got a clue what this does.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPPutFile($l_FTPSession, $s_LocalFile, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'FtpPutFile', 'long', $l_FTPSession, 'str', $s_LocalFile, 'str', $s_RemoteFile, 'long', $l_Flags, 'long', $l_Context)
    If @error OR $ai_FTPPutFile[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPPutFile[0]

    EndFunc ;==> _FTPPutFile()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPDelFile()
    ; Description: Delete an file from an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_RemoteFile - The remote Location for the file.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPDelFile($l_FTPSession, $s_RemoteFile)

    Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'FtpDeleteFile', 'long', $l_FTPSession, 'str', $s_RemoteFile)
    If @error OR $ai_FTPPutFile[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPPutFile[0]

    EndFunc ;==> _FTPDelFile()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPRenameFile()
    ; Description: Renames an file on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_Existing - The old file name.
    ; $s_New - The new file name.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPRenameFile($l_FTPSession, $s_Existing, $s_New)

    Local $ai_FTPRenameFile = DllCall('wininet.dll', 'int', 'FtpRenameFile', 'long', $l_FTPSession, 'str', $s_Existing, 'str', $s_New)
    If @error OR $ai_FTPRenameFile[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPRenameFile[0]

    EndFunc ;==> _FTPRenameFile()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPMakeDir()
    ; Description: Makes an Directory on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_Remote - The file name to be deleted.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPMakeDir($l_FTPSession, $s_Remote)

    Local $ai_FTPMakeDir = DllCall('wininet.dll', 'int', 'FtpCreateDirectory', 'long', $l_FTPSession, 'str', $s_Remote)
    If @error OR $ai_FTPMakeDir[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPMakeDir[0]

    EndFunc ;==> _FTPMakeDir()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPDelDir()
    ; Description: Delete's an Directory on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_Remote - The Directory to be deleted.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPDelDir($l_FTPSession, $s_Remote)

    Local $ai_FTPDelDir = DllCall('wininet.dll', 'int', 'FtpRemoveDirectory', 'long', $l_FTPSession, 'str', $s_Remote)
    If @error OR $ai_FTPDelDir[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPDelDir[0]

    EndFunc ;==> _FTPDelDir()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPClose()
    ; Description: Closes the _FTPOpen session.
    ; Parameter(s): $l_InternetSession - The Long from _FTPOpen()
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Wouter van Kesteren
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPClose($l_InternetSession)

    Local $ai_InternetCloseHandle = DllCall('wininet.dll', 'int', 'InternetCloseHandle', 'long', $l_InternetSession)
    If @error OR $ai_InternetCloseHandle[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf
    DllClose($dll)
    Return $ai_InternetCloseHandle[0]

    EndFunc ;==> _FTPClose()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; ================================================= FTP Functions for UDF ==========================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Local Const $FTP_ASCII = 1
    Local Const $FTP_BINARY = 2
    Local Const $FTP_OVERWRITE = 0
    Local Const $FTP_DONTOVERWRIRE = -1
    Local Const $FTP_PASSIVE = 0x8000000
    Local Const $FTP_NONPASSIVE = 0

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    ;
    ; Function Name: _FTPFileFindFirst()
    ; Description: Find First File on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_RemoteFile - The remote Location for the file.
    ; $l_Flags - use the dwFlags parameter to specify 1 for transferring the file in ASCII (Type A transfer method) or 2 for transferring the file in Binary (Type I transfer method).
    ; $l_Context - lContext is used to identify the application context when using callbacks. Since we’re not using callbacks we’ll pass 0.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Dick Bronsdijk
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #cs
    typedef struct _WIN32_FIND_DATA {
    DWORD dwFileAttributes;
    FILETIME ftCreationTime;
    FILETIME ftLastAccessTime;
    FILETIME ftLastWriteTime;
    DWORD nFileSizeHigh;
    DWORD nFileSizeLow;
    DWORD dwReserved0;
    DWORD dwReserved1;
    TCHAR cFileName[MAX_PATH];
    TCHAR cAlternateFileName[14];
    } WIN32_FIND_DATA;
    typedef struct _FILETIME {
    DWORD dwLowDateTime;
    DWORD dwHighDateTime;
    } FILETIME;
    #ce
    Func _FTPFileFindFirst($l_FTPSession, $s_RemoteFile, ByRef $h_Handle, ByRef $l_DllStruct, $l_Flags = 0, $l_Context = 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $str = "int;uint[2];uint[2];uint[2];int;int;int;int;char[256];char[14]"
    Local $FileName
    $l_DllStruct = DllStructCreate($str)
    if @error Then
    SetError(-2)
    Return ""
    endif

    [/autoit] [autoit][/autoit] [autoit]

    Dim $a_FTPFileList[1]
    $a_FTPFileList[0] = 0

    [/autoit] [autoit][/autoit] [autoit]

    Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'FtpFindFirstFile', 'long', $l_FTPSession, 'str', $s_RemoteFile, 'ptr', DllStructGetPtr($l_DllStruct), 'long', $l_Flags, 'long', $l_Context)
    If @error OR $ai_FTPPutFile[0] = 0 Then
    SetError(-1)
    Return $a_FTPFileList
    EndIf
    $h_Handle = $ai_FTPPutFile[0]
    $FileName = DllStructGetData($l_DllStruct, 9)

    [/autoit] [autoit][/autoit] [autoit]

    Dim $a_FTPFileList[12]
    $a_FTPFileList[0] = 12
    $a_FTPFileList[1] = DllStructGetData($l_DllStruct, 1) ; File Attributes
    $a_FTPFileList[2] = DllStructGetData($l_DllStruct, 2, 1) ; Creation Time Low
    $a_FTPFileList[3] = DllStructGetData($l_DllStruct, 2, 2) ; Creation Time High
    $a_FTPFileList[4] = DllStructGetData($l_DllStruct, 3, 1) ; Access Time Low
    $a_FTPFileList[5] = DllStructGetData($l_DllStruct, 3, 2) ; Access Time High
    $a_FTPFileList[6] = DllStructGetData($l_DllStruct, 4, 1) ; Last Write Low
    $a_FTPFileList[7] = DllStructGetData($l_DllStruct, 4, 2) ; Last Write High
    $a_FTPFileList[8] = DllStructGetData($l_DllStruct, 5) ; File Size High
    $a_FTPFileList[9] = DllStructGetData($l_DllStruct, 6) ; File Size Low
    $a_FTPFileList[10] = DllStructGetData($l_DllStruct, 9) ; File Name
    $a_FTPFileList[11] = DllStructGetData($l_DllStruct, 10) ; Altername

    [/autoit] [autoit][/autoit] [autoit]

    Return $a_FTPFileList

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc;==> _FTPFileFindFirst()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    ;
    ; Function Name: _FTPFileFindNext()
    ; Description: Find Next File on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_RemoteFile - The remote Location for the file.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Dick Bronsdijk
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _FTPFileFindNext($h_Handle, $l_DllStruct)

    [/autoit] [autoit][/autoit] [autoit]

    Dim $a_FTPFileList[1]
    $a_FTPFileList[0] = 0

    [/autoit] [autoit][/autoit] [autoit]

    Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'InternetFindNextFile', 'long', $h_Handle, 'ptr', DllStructGetPtr($l_DllStruct))
    If @error OR $ai_FTPPutFile[0] = 0 Then
    SetError(-1)
    Return $a_FTPFileList
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Dim $a_FTPFileList[12]
    $a_FTPFileList[0] = 12
    $a_FTPFileList[1] = DllStructGetData($l_DllStruct, 1) ; File Attributes
    $a_FTPFileList[2] = DllStructGetData($l_DllStruct, 2, 1) ; Creation Time Low
    $a_FTPFileList[3] = DllStructGetData($l_DllStruct, 2, 2) ; Creation Time High
    $a_FTPFileList[4] = DllStructGetData($l_DllStruct, 3, 1) ; Access Time Low
    $a_FTPFileList[5] = DllStructGetData($l_DllStruct, 3, 2) ; Access Time High
    $a_FTPFileList[6] = DllStructGetData($l_DllStruct, 4, 1) ; Last Write Low
    $a_FTPFileList[7] = DllStructGetData($l_DllStruct, 4, 2) ; Last Write High
    $a_FTPFileList[8] = DllStructGetData($l_DllStruct, 5) ; File Size High
    $a_FTPFileList[9] = DllStructGetData($l_DllStruct, 6) ; File Size Low
    $a_FTPFileList[10] = DllStructGetData($l_DllStruct, 9) ; File Name
    $a_FTPFileList[11] = DllStructGetData($l_DllStruct, 10) ; Altername

    [/autoit] [autoit][/autoit] [autoit]

    Return $a_FTPFileList

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc;==> _FTPFileFindNext()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    ;
    ; Function Name: _FTPFileFindClose()
    ; Description: Delete FindFile Structure.
    ; Parameter(s):
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Dick Bronsdijk
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _FTPFileFindClose($h_Handle, $l_DllStruct)

    [/autoit] [autoit][/autoit] [autoit]

    ;~ DllStructDelete($l_DllStruct)

    Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'InternetCloseHandle', 'long', $h_Handle)
    If @error OR $ai_FTPPutFile[0] = 0 Then
    SetError(-1)
    Return ""
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Return $ai_FTPPutFile[0]

    EndFunc;==> _FTPFileFindClose()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPGetFile() - db Test
    ; Description: Gets an file from an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_RemoteFile - The remote Location for the file.
    ; $s_LocalFile - The local file.
    ; $l_Flags - use the dwFlags parameter to specify
    ; - 1 for transferring the file in ASCII (Type A transfer method) or
    ; - 2 for transferring the file in Binary (Type I transfer method).
    ; $l_Fail - Allow local file to be overwritten if it exists
    ; - -1 Don't allow overwrite (default)
    ; - 0 Allow overwrite
    ; $l_Attributes - Attributes for local file
    ; $l_Context - lContext is used to identify the application context when using callbacks. Since we’re not using callbacks we’ll pass 0.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Dick Bronsdijk
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _FTPGetFile($l_FTPSession, $s_RemoteFile, $s_LocalFile, $l_Flags = 2, $l_Fail = -1, $l_Attributes = 0, $l_Context = 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $ai_FTPGetFile = DllCall('wininet.dll', 'int', 'FtpGetFile', 'long', $l_FTPSession, 'str', $s_RemoteFile, 'str', $s_LocalFile, 'long', $l_Fail, 'long', $l_Attributes, 'long', $l_Flags, 'long', $l_Context)
    If @error OR $ai_FTPGetFile[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPGetFile[0]

    EndFunc;==> _FTPGetFile()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPListFiles
    ; Description::
    ; Parameter(s):
    ; Requirement(s):
    ; Return Value(s):
    ; Author(s): SpookMeister
    ;
    ;===============================================================================
    ;

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPListFiles($l_FTPSession, $l_Flags = 0, $l_Context = 0)
    Local $str, $ret, $search,$file,$WIN32_FIND_DATA
    $str = "dword;int64;int64;int64;dword;dword;dword;dword;char[256];char[14]"
    $WIN32_FIND_DATA = DllStructCreate($str)
    Local $callFindFirst = DllCall('wininet.dll', 'int', 'FtpFindFirstFile', 'long', $l_FTPSession, 'str', "", 'ptr', DllStructGetPtr($WIN32_FIND_DATA), 'long', $l_Flags, 'long', $l_Context)
    If Not $callFindFirst[0] Then
    MsgBox(0, "Folder Empty", "No Files Found ")
    SetError(-1)
    Return 0
    EndIf
    $ret = ""
    While 1
    If DllStructGetData($WIN32_FIND_DATA, 1) <> 16 Then $ret = $ret & DllStructGetData($WIN32_FIND_DATA, 9) & "|"
    Local $callFindNext = DllCall('wininet.dll', 'int', 'InternetFindNextFile', 'long', $callFindFirst[0], 'ptr', DllStructGetPtr($WIN32_FIND_DATA))
    If Not $callFindNext[0] Then
    ExitLoop
    EndIf
    WEnd
    $WIN32_FIND_DATA = 0
    Return StringTrimRight($ret, 1)
    EndFunc ;==>_FTPListFiles

    [/autoit] [autoit][/autoit] [autoit]

    ;===================================================================================================
    ;
    ; Function Name: _FTPPutFolderContents()
    ; Description: Puts an folder on an FTP server. Recursivley if selected
    ; Parameter(s): $l_InternetSession - The Long from _FTPConnect()
    ; $s_LocalFolder - The local folder i.e. "c:\temp".
    ; $s_RemoteFolder - The remote folder i.e. '/website/home'.
    ; $b_RecursivePut - Recurse through sub-dirs. 0=Non recursive, 1=Recursive
    ; Requirement(s): DllCall, wininet.dll
    ; Author(s): Stumpii
    ;
    ;===================================================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPPutFolderContents($l_InternetSession, $s_LocalFolder, $s_RemoteFolder, $b_RecursivePut)
    Local $search, $file
    ; Shows the filenames of all files in the current directory.
    $search = FileFindFirstFile($s_LocalFolder & "\*.*")

    ; Check if the search was successful
    If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
    EndIf

    While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop
    If StringInStr(FileGetAttrib($s_LocalFolder & "\" & $file), "D") Then
    _FTPMakeDir($l_InternetSession, $s_RemoteFolder & "/" & $file)
    If $b_RecursivePut Then
    _FTPPutFolderContents($l_InternetSession, $s_LocalFolder & "\" & $file, $s_RemoteFolder & "/" & $file, $b_RecursivePut)
    EndIf
    Else
    _FTPPutFile($l_InternetSession, $s_LocalFolder & "\" & $file, $s_RemoteFolder & "/" & $file, 0, 0)
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ; Close the search handle
    FileClose($search)

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_FTPPutFolderContents

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; define some constants - can be used with _FTPPutFile and _FTPGetFile and ftp open flags
    Const $INTERNET_FLAG_PASSIVE = 0x08000000
    Const $INTERNET_FLAG_TRANSFER_ASCII = 0x00000001
    Const $INTERNET_FLAG_TRANSFER_BINARY = 0x00000002
    Const $INTERNET_DEFAULT_FTP_PORT = 21
    Const $INTERNET_SERVICE_FTP = 1

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPCommand()
    ; Description: Sends a command to an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPOpen()
    ; $s_FTPCommand - Commad string to send to FTP Server
    ; $l_ExpectResponse - Data socket for response in Async mode
    ; $s_Context - A pointer to a variable that contains an application-defined
    ; value used to identify the application context in callback operations
    ; $s_Handle - A pointer to a handle that is created if a valid data socket is opened.
    ; The $s_ExpectResponse parameter must be set to TRUE for phFtpCommand to be filled.
    ;
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - Returns an indentifier.
    ; On Failure - 0 and sets @ERROR
    ; Author(s): Bill Mezian
    ;
    ; Command Examples: depends on server syntax. The following is for
    ; Binary transfer, ASCII transfer, Passive transfer mode (used with firewalls)
    ; 'type I' 'type A' 'pasv'
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPCommand($l_FTPSession, $s_FTPCommand, $l_Flags = 0x00000001, $l_ExpectResponse = 0, $l_Context = 0, $s_Handle = '')

    [/autoit] [autoit][/autoit] [autoit]

    Local $ai_FTPCommand = DllCall('wininet.dll', 'int', 'FtpCommand', 'long', $l_FTPSession, 'long', $l_ExpectResponse, 'long', $l_Flags, 'str', $s_FTPCommand, 'long', $l_Context, 'str', $s_Handle)
    If @error OR $ai_FTPCommand[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf
    ;Return $s_return
    Return $ai_FTPCommand[0]

    EndFunc;==> _FTPCommand()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FTPGetCurrentDir()
    ; Description: Get Current Directory on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - Directory Name
    ; On Failure - 0
    ; Author(s): Beast
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FTPGetCurrentDir($l_FTPSession)

    [/autoit] [autoit][/autoit] [autoit]

    Local $ai_FTPGetCurrentDir = DllCall('wininet.dll', 'int', 'FtpGetCurrentDirectory', 'long', $l_FTPSession, 'str', "", 'long_ptr', 260)
    If @error OR $ai_FTPGetCurrentDir[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPGetCurrentDir[2]

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndFunc;==> _FTPGetCurrentDir()

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FtpSetCurrentDir()
    ; Description: Set Current Directory on an FTP server.
    ; Parameter(s): $l_FTPSession - The Long from _FTPConnect()
    ; $s_Remote - The Directory to be set.
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Beast
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _FtpSetCurrentDir($l_FTPSession, $s_Remote)

    Local $ai_FTPSetCurrentDir = DllCall('wininet.dll', 'int', 'FtpSetCurrentDirectory', 'long', $l_FTPSession, 'str', $s_Remote)
    If @error OR $ai_FTPSetCurrentDir[0] = 0 Then
    SetError(-1)
    Return 0
    EndIf

    Return $ai_FTPSetCurrentDir[0]

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc;==> _FtpSetCurrentDir()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FtpFileListTo2DArray()
    ; Description: Get Filenames and filesizes of a Directory.
    ; Parameter(s): $Remote_Dir - The Directory to be set.
    ; $Server - Server address
    ; $username - User name
    ; $pass - Password
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Me
    ;
    ;===============================================================================
    Func _FTPFileListTo2DArray($Remote_Dir, $server = '', $username = '', $pass = '')
    Local $2DArray
    $2DArray = _ArrayCreate($2DArray)
    $Open = _FTPOpen('xbox')
    $Conn = _FTPConnect($Open, $server, $username, $pass, 1)
    $setdir = _FtpSetCurrentDir($Conn, $Remote_Dir)
    $cdir = _FTPGetCurrentDir($Conn)
    $files = _FTPFilesListToArray($Conn, 2)
    $max = UBound($files)
    ReDim $2DArray[$max][2]
    For $i = 0 To $files[0]
    $2DArray[$i][0] = $files[$i]
    Next
    $Ftpc = _FTPClose($Open)
    $Totalsize = 0
    $end = $2DArray[0][0]
    ProgressOn('FTP', 'Getting File Sizes...')
    For $i = 1 To $end
    $Open = _FTPOpen('xbox')
    $Conn = _FTPConnect($Open, $server, $username, $pass, 1)
    $setdir = _FtpSetCurrentDir($Conn, '/F/Videos/')
    $size = _FTPGetFileSize($Conn, $2DArray[$i][0])
    $2DArray[$i][1] = $size
    $size = Round($size / 1048576, 1)
    $Totalsize = $size + $Totalsize
    $Ftpc = _FTPClose($Open)
    ProgressSet(($i / $end) * 100, Round(($i / $end) * 100, 1) & ' % ' & $2DArray[$i][0], $end - $i & ' Files ' & $Totalsize & ' MB Total')
    Next
    ProgressOff()
    $2DArray[0][1] = $Totalsize
    Return $2DArray
    EndFunc ;==>_FTPFileListTo2DArray

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FtpFilesListToArray()
    ; Description: Get Filenames, Directorys, or Both of a Directory.
    ; Parameter(s): $l_FTPSession - Long From _FileConnect
    ; $Return_type - 0 = Both Files and Directorys, 1 = Directorys, 2 = Files
    ; Requirement(s): DllCall, wininet.dll
    ; Return Value(s): On Success - 1
    ; On Failure - 0
    ; Author(s): Me
    ;
    ;===============================================================================

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _FTPFilesListToArray($l_FTPSession, $Return_Type = 0, $l_Flags = 0, $l_Context = 0)
    Dim $array, $array2d
    $array = _ArrayCreate($array)
    $array2d = _ArrayCreate($array2d)
    $str = "dword;int64;int64;int64;dword;dword;dword;dword;char[256];char[14]"
    $WIN32_FIND_DATA = DllStructCreate($str)
    Local $callFindFirst = DllCall('wininet.dll', 'int', 'FtpFindFirstFile', 'long', $l_FTPSession, 'str', "", 'ptr', DllStructGetPtr($WIN32_FIND_DATA), 'long', $l_Flags, 'long', $l_Context)
    If Not $callFindFirst[0] Then
    MsgBox(0, "Folder Empty", "No Files Found ")
    SetError(-1)
    Return 0
    EndIf
    $ret = ""
    While 1
    Select
    Case $Return_Type = 0 ; Folders and files
    If DllStructGetData($WIN32_FIND_DATA, 1) = 16 Then
    _ArrayInsert($array, 1, DllStructGetData($WIN32_FIND_DATA, 9)) ; Add Folder to top of array
    Else
    _ArrayAdd($array, DllStructGetData($WIN32_FIND_DATA, 9)) ; Add folder to array
    EndIf
    Case $Return_Type = 1 ; Folders only
    If DllStructGetData($WIN32_FIND_DATA, 1) = 16 Then _ArrayAdd($array, DllStructGetData($WIN32_FIND_DATA, 9))
    Case $Return_Type = 2 ; Files only
    If DllStructGetData($WIN32_FIND_DATA, 1) <> 16 Then _ArrayAdd($array, DllStructGetData($WIN32_FIND_DATA, 9))
    EndSelect
    Local $callFindNext = DllCall('wininet.dll', 'int', 'InternetFindNextFile', 'long', $callFindFirst[0], 'ptr', DllStructGetPtr($WIN32_FIND_DATA))
    If Not $callFindNext[0] Then
    ExitLoop
    EndIf
    WEnd
    $WIN32_FIND_DATA = 0
    $array[0] = UBound($array) - 1
    Return $array
    EndFunc ;==>_FTPFilesListToArray

    [/autoit]

    einfach mit #include <ftp.au3>
    muss im selben Ordner oder include-Ordner von Autoit liegen

  • hallo levi danke für die file habe zwar die sufu benutzt aber nur einen link für die datei gefunden und der war tot danke

    P.S dein code geht nit es öffnet sich nix

    nochdazu brächte ich das ja so das man

    sein ftp username eingeben kann sein passwort und den link zu seite

    weil sonst kann man sich ja nit einwählen und dann wenn ich das hätte
    müsste man noch daten auswählen können (also wieder ein input)
    und dann muss man noch angeben können wohiun er das dln soll also so isses sau umständlich zu lösen...

  • ganz einfach Do it yourself - einfach ausprobieren und wenn du nicht weiterkommst fragst du - Autoit hat das beste help-file was ich bis jetzt gesehen hab und du kannst hier im forum recht viel finden und analysieren und verwenden

    Setz dich einfach mal selbst ran!

  • Zitat

    Original von leviathan
    ganz einfach Do it yourself - einfach ausprobieren und wenn du nicht weiterkommst fragst du - Autoit hat das beste help-file was ich bis jetzt gesehen hab und du kannst hier im forum recht viel finden und analysieren und verwenden

    Setz dich einfach mal selbst ran!


    es gibt eindeutig genügend bespiele hier im forum und wie levi sagte in der hilfe ist das bestens erklärt...alles 15 mal erklären bringt einfach nichts....

    snoozer

  • ok ok ich habe mich jetzt mal selber ein wenig rangesetzt und bin schon mal hier gelandet

    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Administrator\Desktop\BackUpTool.kxf
    $BackUpTool = GUICreate("Back Up Tool", 481, 178, 374, 253)
    GUISetBkColor(0xFFFFFF)
    $l1 = GUICtrlCreateLabel("Benutzername :", 0, 80, 78, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l2 = GUICtrlCreateLabel("Passwort :", 0, 48, 53, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l3 = GUICtrlCreateLabel("Link :", 0, 16, 30, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i1 = GUICtrlCreateInput("", 32, 8, 289, 21)
    $i2 = GUICtrlCreateInput("", 56, 40, 265, 21)
    $i3 = GUICtrlCreateInput("", 80, 72, 241, 21)
    $l4 = GUICtrlCreateLabel("Back Up Download Pfad :", 0, 160, 128, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i4 = GUICtrlCreateInput("", 136, 152, 185, 21)
    $b1 = GUICtrlCreateButton("Start Back Up Tool", 344, 16, 115, 97, 0)
    $l5 = GUICtrlCreateLabel("Backup Pflichtige Datei :", 0, 112, 121, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i5 = GUICtrlCreateInput("", 128, 104, 193, 21)
    $c1 = GUICtrlCreateLabel("copyrighted by WoW-Unit", 352, 160, 126, 17)
    GUICtrlSetFont(-1, 6, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    EndSwitch
    WEnd

    run("FileZilla.exe")
    sleep(500)
    SEND(""GUICtrlread($l3))
    sleep(100)
    send(""guictrlread($l2))
    sleep(100)
    send(""guictrlread($l1))
    sleep(100)
    SEND("{enter}")


    jetzt muss ich nur noch schaffen das es das was man bei dem input Backup pflichtige datei eingbt irgendwie focusiert und dann in das verzeichnis vom input Backup downlad pfad rein downloadet
    (ich verwende hier in dem code das programm filezilla da ich keinen anderen weg wusste ich hoffe das ist erlaubt naja es is freeware aber naja)

    als erstes muss ich den button irgendwie zum laufen kriegen

  • Ich weiß zwar nicht was Du bei der Suche angibst aber, wie wäre es einfach mal mit "ftp" anzufangen und nicht mit "perfekte Lösung für WOW-Unit" .
    Wir helfen Dir hier bestimmt gerne, aber ein wenig Willen zur Selbsthilfe wäre schon wirklich toll, ehrlich. Für mich klingt dieser Thread nach:
    Schreibt mir mal ein Skript damit ich mich ganz doll freue und mich möglichst nicht mit autoit beschäftigen muß... 8o

    :Edit

    aha, geht doch ;)

    für FTP, und für das lokale Verzeichnis mal ein Beispiel:

    [autoit]


    #include <ftp.au3>
    #include <file.au3>

    [/autoit][autoit][/autoit][autoit]

    $sLogFile = @scriptdir&"\fehler.log"
    $localDir = _getFolder($input) ; $input = input-feld-Variable
    Local $search, $ftpOpen,$ftpConnect,$handle, $DllRect,$FileInfo,$delsuccess
    $ftpOpen = _FTPOpen("derDownloadOnkel")
    $ftpConnect = _FTPConnect($ftpOpen, "Servername", "user", "passwort")
    _FtpSetCurrentDir($ftpConnect, "/pub/") ;falls in ein anderes Verzeichnis gewch
    $FileInfo = _FTPFileFindFirst($ftpConnect, "*.jpg", $handle, $DllRect)
    If $FileInfo[0] Then
    Do
    $success = _FTPGetFile($ftpConnect, $FileInfo[10],$localDir &"\"& $FileInfo[10])
    If $success = 0 Then
    _FileWriteLog($sLogFile,"Probleme bei Download von: "&$FileInfo[10])
    SetError(0)
    Else
    $delsuccess = _FTPDelFile($ftpConnect, $FileInfo[10])
    If $delsuccess = 0 Then
    _FileWriteLog($sLogFile,"Probleme beim Löschen von: "&$FileInfo[10])
    EndIf
    SetError(0)
    EndIf
    $FileInfo = _FtpFileFindNext($handle, $DllRect)
    Until Not $FileInfo[0]
    EndIf
    _FtpFileFindClose($handle, $DllRect)
    _FTPClose($ftpOpen)

    [/autoit][autoit][/autoit][autoit]

    Func _getFolder(ByRef $input)
    $sFolder = FileSelectFolder("Verzeichnis auswählen:", "")
    If Not @error = 1 Or $sFolder <> "" Then
    GUICtrlSetData($input, $sFolder)
    EndIf
    EndFunc ;==>_getFolder

    [/autoit][autoit][/autoit][autoit][/autoit]

    der Foren-Outlaw

    3 Mal editiert, zuletzt von jonk (12. Juni 2007 um 20:44)

  • Hi,

    ist ja nicht so schlimm ;). Am besten erstmal posten was das Problem ist und die eigenen Versuche. Dann kann man sich schritt für schritt durcharbeiten.

    der Foren-Outlaw

    Einmal editiert, zuletzt von jonk (12. Juni 2007 um 20:42)

  • so leute bin schon etwas weiter kein plan wie ich es genau gemacht habe aber mit rummfummeln habe ich den button fuktionstüchtig bekommen Xd

    mein problem is nur die lese befehle gehen nich beim ausführen des scrippts schlägt er immer ab zeile 48 alarm und redet was mit dem guictrkread von wegen falsch seht ihr hier meinen fehler ?

    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Administrator\Desktop\BackUpTool.kxf
    $BackUpTool = GUICreate("Back Up Tool", 481, 178, 374, 253)
    GUISetBkColor(0xFFFFFF)
    $l1 = GUICtrlCreateLabel("Benutzername :", 0, 80, 78, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l2 = GUICtrlCreateLabel("Passwort :", 0, 48, 53, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l3 = GUICtrlCreateLabel("Link :", 0, 16, 30, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i1 = GUICtrlCreateInput("", 32, 8, 289, 21)
    $i2 = GUICtrlCreateInput("", 56, 40, 265, 21)
    $i3 = GUICtrlCreateInput("", 80, 72, 241, 21)
    $l4 = GUICtrlCreateLabel("Back Up Download Pfad :", 0, 160, 128, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i4 = GUICtrlCreateInput("", 136, 152, 185, 21)
    $b1 = GUICtrlCreateButton("Start Back Up Tool", 344, 16, 115, 97, 0)
    $l5 = GUICtrlCreateLabel("Backup Pflichtige Datei :", 0, 112, 121, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i5 = GUICtrlCreateInput("", 128, 104, 193, 21)
    $c1 = GUICtrlCreateLabel("copyrighted by WoW-Unit", 352, 160, 126, 17)
    GUICtrlSetFont(-1, 6, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $b1
    _blubb()
    EndSwitch
    WEnd


    func _blubb()
    run("FileZilla.exe")
    sleep(500)
    SEND(""GUICtrlread($i1))
    sleep(100)
    send(""guictrlread($i2))
    sleep(100)
    send(""guictrlread($i3))
    sleep(100)
    SEND("{enter}")

    EndFunc


    @jonk ehrlich gesagt verstehe ich dein beispiel nicht ...

  • [autoit]


    func _blubb()
    run("FileZilla.exe")
    sleep(500)
    SEND(GUICtrlread($i1)) ; ohne ""
    sleep(100)
    send(guictrlread($i2))
    sleep(100)
    send(guictrlread($i3))
    sleep(100)
    SEND("{enter}")

    [/autoit][autoit][/autoit][autoit]

    EndFunc

    [/autoit]
  • danke jonk ich dachte ich müsste des so machen weil bei nem andren befehl musste ich mal mit ""

    danke nochmal werde mich sicher nochmal melden

    edit so neues prob komm nit drum rum der sendet bei den input dingern den namen der vorm input steht mit !! also link usw.

    ich glaube der fehler hatt sich erledigt ich habe nicht den input ausgelesen sondern die label

  • Wow-Unit ich hätte noch einen Wunsch - könntest du bitte mal beim Code die Tags benutzen, weil da hat man code-highlighting und das ist angenehmer zu lesen

    einfach auf das autoitzeichen klicken was eingeben und dann den code halt dazwischen einfügen und das davor geschriebene löschen und spoiler ist das Zeichen mit den [] - thx

  • soo hab mal ein paar Anpassungen vorgenommen :)

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Administrator\Desktop\BackUpTool.kxf
    $BackUpTool = GUICreate("Back Up Tool", 481, 178, 374, 253)
    GUISetBkColor(0xFFFFFF)
    $l1 = GUICtrlCreateLabel("Benutzername :", 0, 80, 78, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l2 = GUICtrlCreateLabel("Passwort :", 0, 48, 53, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l3 = GUICtrlCreateLabel("Link :", 0, 16, 30, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i1 = GUICtrlCreateInput("", 32, 8, 289, 21)
    $i2 = GUICtrlCreateInput("", 56, 40, 265, 21,$ES_PASSWORD)
    $i3 = GUICtrlCreateInput("", 80, 72, 241, 21)
    $l4 = GUICtrlCreateLabel("Back Up Download Pfad :", 0, 160, 128, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i4 = GUICtrlCreateInput("", 136, 152, 185, 21)
    $but_pfad = GuiCtrlCreateButton("...",325,152,25,17)
    $b1 = GUICtrlCreateButton("Start Back Up Tool", 344, 16, 115, 97, 0)
    $l5 = GUICtrlCreateLabel("Backup Pflichtige Datei :", 0, 112, 121, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i5 = GUICtrlCreateInput("", 128, 104, 193, 21)
    $c1 = GUICtrlCreateLabel("copyrighted by WoW-Unit", 352, 160, 126, 17)
    GUICtrlSetFont(-1, 6, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $b1
    _blubb()
    Case $but_pfad
    _getFolder($i4)
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func _blubb()
    run("FileZilla.exe")
    sleep(500)
    SEND(GUICtrlread($i1))
    sleep(100)
    send(guictrlread($i2))
    sleep(100)
    send(guictrlread($i3))
    sleep(100)
    SEND("{enter}")

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _getFolder(ByRef $input)
    $sFolder = FileSelectFolder("Verzeichnis auswählen:", "")
    If Not @error = 1 Or $sFolder <> "" Then
    GUICtrlSetData($input, $sFolder)
    EndIf
    EndFunc ;==>_getFolder

    [/autoit]

    der Foren-Outlaw

    Einmal editiert, zuletzt von jonk (12. Juni 2007 um 21:12)

  • kennt ihr zufällig das programm filezille wenn nicht leicht zu ergooglen!!!
    wie bekomme ich da jetzt (per input) genau eine datei in den focus und wie downloade ich diese dann ?

    also z.b.

    input(daort wird eingegeben) test ordner

    das programm filezilla öffnet sich loggt sich ein
    und a ist dan eine liste mit alle ordnern

    und wie kann ich des machen das genau dieser ordner runnergeladen wird ?
    ohne maus position auf jeden fall und so weil das programm könnte der benutzer auusversehen verschieben oder der jeweilige ordner kann weiter unten oder oben sein usw.

    also z.b.

    input eingabe
    test ordner
    also starte progrmm
    filezilla
    setzte focus auf
    test ordner
    und downloade irgendwie

  • ok erstmal an levi wie bitte ? was meinst du um was gehts ?
    was sind tags wofür sind die und was zum teufel is bitte code highlitning ?

    und ann jonk also ich habe vergessen zu schreiben das der alte code nicht ging hier ist mein neuer der funktioniert auch wirklich also mit den ersten 3 input´s
    und er kann sich auch bei filezilla auf meinem ftp einloggen problemlos

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Administrator\Desktop\BackUpTool.kxf
    $BackUpTool = GUICreate("Back Up Tool", 481, 178, 374, 253)
    GUISetBkColor(0xFFFFFF)
    $l1 = GUICtrlCreateLabel("Benutzername :", 0, 80, 78, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l2 = GUICtrlCreateLabel("Passwort :", 0, 48, 53, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $l3 = GUICtrlCreateLabel("Link :", 0, 16, 30, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i1 = GUICtrlCreateInput("", 32, 8, 289, 21)
    $i2 = GUICtrlCreateInput("", 56, 40, 265, 21)
    $i3 = GUICtrlCreateInput("", 80, 72, 241, 21)
    $l4 = GUICtrlCreateLabel("Back Up Download Pfad :", 0, 160, 128, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i4 = GUICtrlCreateInput("", 136, 152, 185, 21)
    $b1 = GUICtrlCreateButton("Start Back Up Tool", 344, 16, 115, 97, 0)
    $l5 = GUICtrlCreateLabel("Backup Pflichtige Datei :", 0, 112, 121, 17)
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $i5 = GUICtrlCreateInput("", 128, 104, 193, 21)
    $c1 = GUICtrlCreateLabel("copyrighted by WoW-Unit", 352, 160, 126, 17)
    GUICtrlSetFont(-1, 6, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFF0000)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $b1
    _blubb()
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func _blubb()
    run("FileZilla.exe")
    sleep(500)
    SEND(GUICtrlread($i1))
    sleep(100)
    send("{TAB}")
    sleep(100)
    send(guictrlread($i3))
    sleep(100)
    send("{TAB}")
    sleep(100)
    send(guictrlread($i2))
    sleep(100)
    send("{TAB}")
    sleep(100)
    send("21")
    sleep(100)
    SEND("{enter}")

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit]


    so besser levi ?
    oder wie war das gemeint ?


    ok ich habe jetzt in den code den du hier siehst deinen zusatz eingefügt und habe jetzt einen browse butten danke aber wenn man jetzt was mit diesem inputt downloaden würde also wenn wir den fehlenden input der entscheidet was runtergeladen wir zum laufen kriegen wird die datei auch wirklich im eingegeben pfad gespeichert ?
    oder ist das erstmal nur vorläufig so das wir schon mal das mit dem browse hätten ?