Jump to content

$GUI_ACCEPTFILES


flyingboz
 Share

Recommended Posts

I have been unable to find a way to handle a drag and drop operation of multiple files.

Found no references in docs / search.

Possible or no? If possible, what am I missing?

I am able to handle files one at a time, but would like the add'l ease of use

that supporting the shift- or ctrl- select would bring.

Thanks!

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

This might be offtopic, but you know what I think would be cool? If drag/drop operations were handled differently. Like maybe have every object able to be dropped on, or have it so you can just drop on the background of the GUI, and then we can make our own handlers. That way we could have things like dropping a file on the window, and then have the window load that file instead of just pasting text into an edit.

... Just my misplaced two cents.

Link to comment
Share on other sites

I'd still like to know if handling multiple files is possible... Congratulations to the Au3 development team on the new release!

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

I'd still like to know if handling multiple files is possible... Congratulations to the Au3 development team on the new release!

<{POST_SNAPBACK}>

Try this :

Global $var

Global $mypath

Global $multi_file

Global $thepath

Global $nb

Global $list

$var = FileOpenDialog("Open", "", "Texte file (*.txt)", 1 + 4 )

If @error Then

MsgBox(262144 + 16,"Programme QUIT","No file select", 30)

Exit

Endif

If StringInStr($var,"|") Then

$var = StringSplit( $var, "|")

$mypath = $var[1] & "\"

$multi_file = 1

Else

$thepath = StringSplit($var,"\")

For $nb = 1 to ($thepath[0]-1)

$mypath = $mypath & $thepath[$nb] & "\"

Next

$multi_file = 0

EndIf

MsgBox(0, "The path is", $mypath, 30)

If $multi_file Then

For $nb = 2 to $var[0]

$list = $list & $mypath & $var[$nb] & @CRLF

Next

MsgBox(0, "Files selected are", $list, 30)

Else

MsgBox(0, "File selected is", $var, 30)

EndIf

May be this can help you.

Link to comment
Share on other sites

Thanks for the reply.

I know that FileOpenDialog() can support it -- I'm specifically asking about the GUI drag/drop capability allowed by $GUI_ACCEPTFILES --

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

$GUI_ACCEPTFILES

strange... annoying...

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

I`m wondering about this myself, so I think I`ll join this

thread and ask : Is it possible ?!?

<{POST_SNAPBACK}>

no only on file is possible. I should have name the state $GUI_ACCEPTFILE. In fact as the main window must have the $WS_EX_ACCEPTFILES extended style. I just cut and paste too much for defining the GUI control state. :lmao:
Link to comment
Share on other sites

Thanks for the resonse, jpm. It's good to know that I'm not doing something stupid. (this time.) Do you anticipate adding this functionality?

An add'l line in the docs would be of use, too.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

Thanks for the resonse, jpm.  It's good to know that I'm not doing something stupid. (this time.)  Do you anticipate adding this functionality?

An add'l line in the docs would be of use, too.

<{POST_SNAPBACK}>

I need help because I cannot find easy solution to do it.

So the easy answer is NO but ... :lmao:

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...