Je ne sais pas si ça peut aider, mais j'avais trouvé une fonction particulière concernant le Drag & Drop.
Cette fonction permet de créer un tableau avec les éléments du Drag & Drop ...
Voici la partie essentielle du code adapter plus ou moins à votre script :
Code : Tout sélectionner
#include <WindowsConstants.au3>
#include <GuiConstants.au3>
#include <Array.au3>
Global $WM_DROPFILES = 0x233
Global $gaDropFiles[1]
GUICreate("",700, 132, 250, 207, -1,$WS_EX_ACCEPTFILES)
$file = GUICtrlCreateInput("", 40, 8, 225, 21)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState()
; Pour le Drag and Drop.
GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES_FUNC")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_DROPPED
_Arraydisplay($gaDropFiles,"xxx")
; Fermeture par la croix.
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
; Fonction pour la gestion du Drag And Drop.
Func WM_DROPFILES_FUNC($hwnd, $msgID, $wParam, $lParam)
Local $nSize, $pFileName
Local $nAmt = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", 0xFFFFFFFF, "ptr", 0, "int", 255)
For $i = 0 To $nAmt[0] - 1
$nSize = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", 0, "int", 0)
$nSize = $nSize[0] + 1
$pFileName = DllStructCreate("char[" & $nSize & "]")
DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", DllStructGetPtr($pFileName), "int", $nSize)
ReDim $gaDropFiles[$i + 1]
$gaDropFiles[$i] = DllStructGetData($pFileName, 1)
;If StringInStr(FileGetAttrib($gaDropFiles[$i]), "D") Then $gaDropFiles[$i] = $gaDropFiles[$i] & "\*.*"
$pFileName = 0
Next
EndFunc ;==>WM_DROPFILES_FUNC