reggy Posted March 8, 2006 Posted March 8, 2006 (edited) I want to introduce my decision of file list drag&drop problem. Macro @Gui_DragFile consists only the last item in the dropped list, so I create background control to handle drop event: #include <GUIConstants.au3> GUICreate('Drop Area', 400, 300, -1, -1, -1, $WS_EX_ACCEPTFILES) ; The control to receive information ; Y=-100 to hide text and HEIGHT+100 to cover whole the window $drop = GUICtrlCreateInput('', 0, -100, 400, 400, $WS_DISABLED + $ES_AUTOHSCROLL, 0) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ;------------------------ ; Create other controls here ;------------------------ GUISetState() $msg = 0 while $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() if not $msg then elseif $msg = $GUI_EVENT_DROPPED then if @GUI_DRAGID = -1 then ; File(s) dropped $files = GUICtrlRead($drop) ; File list in the form: file1|file2|... MsgBox(0, 'Dropped', StringReplace($files, '|', @CR)) endif endif wend GUIDelete() I hope it would be helpful. Good luck! Edited March 8, 2006 by reggy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now