Moin,
C
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=USB-Copy256x256ICON.ico
#AutoIt3Wrapper_Outfile=USB-Copy.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>
#include <Array.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$array = DriveGetDrive($DT_REMOVABLE)
If IsArray($array)= 0 Then
MsgBox ("0","Kein USB-Gerät","Es wurde kein USB-Gerät gefunden")
Exit
EndIf
;~ if @error Then MsgBox(16,"Debug",@error)
;~ _ArrayDisplay($array)
$MaxNr = $array[0] - 2
_ArrayDelete($array,0)
$USB_Devices = _ArrayToString($array)
;~ MsgBox (0,"USB_Devices",$USB_Devices)
$Form_ALL = GUICreate("Gerät_Auswähler", 232, 87)
$Combo_USB = GUICtrlCreateCombo("", 8, 24, 217, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Button_OK = GUICtrlCreateButton("OK", 96, 52, 41, 25)
GUICtrlSetData($Combo_USB, $USB_Devices)
$Label1 = GUICtrlCreateLabel("", 16, 32, 4, 4)
$Label2 = GUICtrlCreateLabel("Wählen Sie bitte eine USB-Quelle:", 35, 2, 200, 20)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Combo_USB
Case $Button_OK
$AuswahlDevice = _ArrayFindAll ($array,GUICtrlRead ($Combo_USB))
_ArrayDelete($array,$AuswahlDevice)
$SourcePath = GUICtrlRead ($Combo_USB)
$nr=-1
ProgressOn ("", "Kopiervorgang", "Läuft...")
Do
$nr=$nr+1
ProgressSet (Round((100/$MaxNr+1)*($nr+1)),"Vorgang läuft - USB-Stick "&$nr+1&" / "&$MaxNr+1)
Sleep (3000)
;~ ~ MsgBox(64,"Test",$nr&@CRLF&$array[0]&@CRLF&$array[$nr])
DirCopy ($SourcePath,$array[$nr],1)
Until $nr = $MaxNr
ProgressSet (100,"Vorgang läuft - USB-Stick "&$nr+1&" / "&$MaxNr+1)
SplashOff()
MsgBox(64,"Kopiervorgang", "Kopiervorgang erfolgreich beendet")
EndSwitch
WEnd
Alles anzeigen
Alles anzeigen
Dies ist mein Code.
Ich würde gerne, dass der Ladebalken flüssig ist.
Dies geht aber nur, wenn ich ein 2tes Skript dafür habe, wie kriege ich das hin, das das zweite auf das erste zugreift usw.
Bin noch neu
Danke im Voraus