Lieber Besucher, herzlich willkommen bei: AutoIt.de - Das deutsche AutoIt-Forum. Falls dies dein erster Besuch auf dieser Seite ist, lies bitte die Hilfe durch. Dort wird dir die Bedienung dieser Seite näher erläutert. Darüber hinaus solltest du dich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutze das Registrierungsformular, um dich zu registrieren oder informiere dich ausführlich über den Registrierungsvorgang. Falls du dich bereits zu einem früheren Zeitpunkt registriert hast, kannst du dich hier anmelden.
Benutzerinformationen überspringen
Registrierungsdatum: 21. Dezember 2008
Wohnort: dahoam wo an sunst?
Beruf: Schüler
Momentane Projekte & Co.
Zitat
Copyright hinweise und sonstige Hinweise des Autors sind dringenst zu Beachten !!!
Ich dachte an so etwas:Ich habe mir was zusammengebastelt.
Komplizierter gehts vermutlich kaum![]()
Leider sieht es komisch aus wenn die Dateien unterschiedlich gross sind.
Die Progressbar macht dann komische Sprünge![]()
Werde es morgen wieder in Angriff nehmen.
@progandy deinen Tipp verstehe ich jetzt überhaupt nicht![]()
Könntest du mir genauer sagen wie das funktionert?
Spoiler
![]()
AutoIt-Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 #include <Array.au3> #include <WindowsConstants.au3> #include <FTP_Ex.au3> $serv = "127.0.0.1" $user = "ADMIN" $pass = "admin" $FTP = _FTPOpen("TEST") $FTPServer = _FTPConnect($FTP,$serv,$user,$pass,1) _FtpSetCurrentDir($FTPServer,'logging2') ; Progress erstellen $hGUI = GUICreate("FTP Dowwnload", 400, 200) $lblInfo = GUICtrlCreateLabel("Downloading *.log files", 10, 10, 380, 20) GUICtrlSetFont(-1,12,800) GUICtrlCreateLabel("Overall Progress:", 10, 40, 380, 16) GUICtrlSetFont(-1,10) $progAllFiles = GUICtrlCreateProgress(10, 60, 380, 20) GUICtrlCreateLabel("Current file:", 10, 90, 380, 15) GUICtrlSetFont(-1,10) $progCurrentFile = GUICtrlCreateProgress(10, 110, 380, 20) $lblDetails = GUICtrlCreateLabel("etset", 10, 140, 380, 50) GUICtrlSetFont(-1,10) GUISetState() ; Ende Progress $file2Darray = _FTPFilesListTo2DArray($FTPServer) Global $filesizetot=0, $filename[1], $filecount=0 For $i=3 To $file2Darray[0][0] If StringInStr($file2Darray[$i][0],'.log')<>0 Then _ArrayAdd($filename,$file2Darray[$i][0]) $filecount+=1 EndIf Next DirCreate('logging') For $i=1 To $filecount GUICtrlSetData($progAllFiles, ($i/$filecount)*100) $x=_FTP_DownloadProgress($FTPServer,'logging\' & $filename[$i],$filename[$i],'_updateprogress') Next GUICtrlSetData($progAllFiles, 100) GUICtrlSetData($progCurrentFile,0) GUICtrlSetData($lblDetails, "Done.") _FTPClose($FTPServer) _FTPClose($FTP) Sleep(2000) ProgressOff() Func _updateprogress($percent) GUICtrlSetData($progCurrentFile,$percent) GUICtrlSetData($lblDetails, $filename[$i] & ' ' & $percent & '%' ) Return 1 Endfunc

Spoiler
![]()
AutoIt-Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #include <Array.au3> #include <FTP_Ex.au3> $serv = "127.0.0.1" $user = "ADMIN" $pass = "admin" $FTP = _FTPOpen("TEST") $FTPServer = _FTPConnect($FTP,$serv,$user,$pass,1) _FtpSetCurrentDir($FTPServer,'logging2') ProgressOn("Download","Downloading *.log files",'', -1 , @DesktopHeight / 2 - 100) $file2Darray = _FTPFilesListTo2DArray($FTPServer) Global $filename[1], $filesize[1], $filecount=0 For $i=3 To $file2Darray[0][0] If StringInStr($file2Darray[$i][0],'.log')<>0 Then _ArrayAdd($filename,$file2Darray[$i][0]) $filecount+=1 EndIf Next DirCreate('logging') For $i=1 To $filecount $x=_FTP_DownloadProgress($FTPServer,'logging\' & $filename[$i],$filename[$i],'_updateprogress') Next ProgressSet(100) _FTPClose($FTPServer) _FTPClose($FTP) Sleep(1000) ProgressOff() Func _updateprogress($percent) ProgressSet(100/$filecount*$i,$percent & '% of ' & $filename[$i]) Return 1 Endfunc
|
|
AutoIt-Quellcode |
1 2 3 |
_FtpSetCurrentDir($FTPServer,'logging2') _FtpSetCurrentDir($FTPServer,' ..') _FtpSetCurrentDir($FTPServer,'logging3') |
Zitat
- Iteration 1 Strip Functions result: Output 2030 lines and stripped 4692 lines
- Iteration 2 Strip Variables result: Output 780 lines and stripped 1186 lines
- Iteration 3 Strip Variables result: Output 760 lines and stripped 20 lines
- Iteration 4 Start the actual Obfuscation.
-### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: _FTP_DownloadProgress
C:\Users\NUNOAN~1\AppData\Local\Temp\OBs201C.tmp(298,1) Warning for line:$ret = Call($FunctionToCall, $result)
-#############################################################################################
-#### Obfuscator Found 1 Error(s)!!!! This means your script could have problems running properly. ####
-#############################################################################################
+> Source 20100 lines 427337 Characters.
+> Stripped 5898 Func/Var lines and 13395 comment lines, Total 1075323 Characters.
+> Saved 95% lines 251% Characters.
+> Obfuscator v1.0.25.0 finished obfuscating 922 lines, created:\AutoIt\SiNVR\RemoteUpdate\RemoteUpdate_Obfuscated.au3
|
|
AutoIt-Quellcode |
1 |
#Obfuscator_Ignore_Funcs= PROGRESSFUNC
|
) 

Spoiler
![]()
AutoIt-Quellcode
1 2 3 4 5 6 7 8 9 10 #include <FTP_EX.au3> $s_ServerName = "ftpname" $s_Username = "user" $s_Password = "passwort" $s_LocalFile = "hochzuladene datei" Call ("_FTPOpen") Call ("_FTPConnect") Call ("_FTPPutFile")

Benutzerinformationen überspringen
Registrierungsdatum: 17. April 2007
Wohnort: NRW
Beruf: Informatikkaufmann
wie siehts denn mit secure connection und ssl/tls support aus? =)

|
|
AutoIt-Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <String.au3> #include <Array.au3> #include <FTP_Ex.au3> Global $fileFindNext[100] GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) $listview = GUICtrlCreateListView("Files | Size (in Kb)", 10, 10, 200, 150) $button = GUICtrlCreateButton("Download", 75, 170, 70, 20) $host = "" $username = "" $pass = "" $Open = _FTPOpen('Giannis FTP') $Conn = _FTPConnect($Open, $host, $username, $pass) $setDir = _FtpSetCurrentDir($Conn, "") $fileList = _FTPFilesListToArray($Conn, 0) For $i = 1 To $fileList[0] $items = GUICtrlCreateListViewItem($fileList[$i] & "|" & Int (_FTPGetFileSize($Conn, $fileList[$i]) / 10000), $listview) Next GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $button $readList = GUICtrlRead(GUICtrlRead($listview)) $stringExplode = _StringExplode ($readList, "|", -1) ;~ ProgressOn("Download","Downloading file",'', -1 , @DesktopHeight / 2 - 100) $fileSize = _FTPGetFileSize($Conn, $stringExplode[0]) $download = _FTP_DownloadProgress($Conn, $stringExplode[0], @ScriptDir & "\" & $stringExplode[0]) ;~ ProgressSet(100) ;~ ProgressOff() ;~ If $download = 1 Then ;~ MsgBox(0, "", "Successfull") ;~ Else MsgBox(0, "", $download) ;~ EndIf ;~ MsgBox(0, "listview", $stringExplode[0]) Case $msg = $listview ;~ $download = _FTPGetFile($Conn, $s EndSelect WEnd ; ... $Ftpc = _FTPClose($Open) |


Benutzerinformationen überspringen
Registrierungsdatum: 10. Juni 2009
Wohnort: Nachrodt-Wiblingwerde
Beruf: Azubi -> Fachkraft für Lagerlogistik
|
|
AutoIt-Quellcode |
1 2 |
Global Const $GENERIC_READ = 0x80000000 Global Const $GENERIC_WRITE = 0x40000000 |