Hallo Autoit.de,
ich habe folgendes vor.
Ich möchte über eine GUI und einer Editbox via Drag and Drop Files kopieren.
Alles bis auf das kopieren funktioniert.
Ich verstehe einfach nicht, warum er das "eingeworfene" File nicht auf ein anderen Testordner schiebt.
Ich würde mich über eure Hilfe sehr freuen.
Hier mein Code:
#include <GUIConstantsEx.au3>
[/autoit][autoit][/autoit][autoit]Opt('MustDeclareVars', 1)
[/autoit][autoit][/autoit][autoit]Example()
[/autoit][autoit][/autoit][autoit]Func Example()
Local $file, $btn, $msg, $filepath, $take, $dest
GUICreate(" GUI input", 300, 300, 400, 400, -1, 0x00000018)
$file = GUICtrlCreateedit("", 20, 5, 250, 200)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
;~ GUICtrlCreateInput("", 10, 35, 300, 20)
$btn = GUICtrlCreateButton("Ok", 220, 250, 50, 20)
$dest = @ScriptDir & "\test"
[/autoit][autoit][/autoit][autoit]GUISetState()
[/autoit][autoit][/autoit][autoit]$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
$filepath = GUICtrlRead($file)
if $filepath <> "" Then
Filecopy($filepath,$dest,1)
Sleep(500)
GUICtrlSetData($file,"")
Sleep(500)
EndIf
Select
Case $msg = $btn
ExitLoop
EndSelect
WEnd
EndFunc
[/autoit]