Sign in to follow this  
Followers 0
Radu

Multiple drag and drop files

5 posts in this topic

Greetings!

Dragging multiple files on a edit or input control is easy and clear from help. But when I try to use this on buttons I can have info only about one file. What I want is to have a little window with just one huge button: when user drags some files here, some action to be on that files. But I cannot do it. I do not know how to get the files list (while on a input file is easy).

The code below show how easy is to have the file list when using an input (just GuiCtrlRead($input)). Please help me to have the list just using the button. Thank you!

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
Local $msg
GUICreate("My Program", 320, 320, -1, -1, -1, $WS_EX_ACCEPTFILES)
$button=GUICtrlCreateButton("drag here",10,10,300,140)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$input = GUICtrlCreateInput("", 10, 160,300,140)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_DROPPED Then
        MsgBox(0,"info","(" & @GUI_DragFile & ") " & GuiCtrlRead($input))
        ConsoleWrite("ID: " & @GUI_DragId & " File: " & @GUI_DragFile & " Drop: " & @GUI_DropId & @CRLF)
    EndIf
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()

I just love AutoIt. But this do not help me enough to know it. I need this forums also ;).

Share this post


Link to post
Share on other sites



I dare to ask: no idea? Or I did not explain clear my issue? Greetings!


I just love AutoIt. But this do not help me enough to know it. I need this forums also ;).

Share this post


Link to post
Share on other sites

First: Thank you! I will check it right now to see if it is anwers to my need.

Secondly: I really hate that supposition when someone asks here something, that for sure he did not search previously. This may be the case in 90% of posts, but not in 100%. Yet, thank you again. I've dig the forum for something like that, but I did not find it. You enlighted me.

A good day to everyone.


I just love AutoIt. But this do not help me enough to know it. I need this forums also ;).

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0