EDIT:
But I actually used my brain and came up with this:
http://www.purebasic.fr/english/viewtopic.php?t=37325
What I suggest is the optional argument returnPathOnly.
Because I need to be able to call DragFiles so I get the "drag interface" but when I drop it I need to be able to just get the directory where it was dropped (if in a directory). This is so I can then in a thread transfer the files there using my OWN method, because I need to transfer the files from my server and it will take some time.
But in the meantime I would love to get any tips on how to get that path. Doesn't the "internal system" of PB know it when the command is used?
DragFiles(Files$ [, Actions [, returnPathOnly]])
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
DragFiles(Files$ [, Actions [, returnPathOnly]])
Last edited by Joakim Christiansen on Tue May 05, 2009 4:17 pm, edited 1 time in total.
I like logic, hence I dislike humans but love computers.
This is not possible because the drag destination is responsible for doing the copying (usually this is the explorer). The drag source doesn't know where the files are going. In fact, the drag destination actually defines what "copy" means. It could well be that the target doesn't want to make a copy at all and just read the file instead.
Just put your files on the local disk first and then call DragFiles(). This is the way other programs are doing it as well.
Just put your files on the local disk first and then call DragFiles(). This is the way other programs are doing it as well.
quidquid Latine dictum sit altum videtur
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
Thanks for the explanation!
Guess I'll need to find a way to "hook" into the window by using its handle and see if I can get any useful information that way.
EDIT:
Haha, my experiments shows that a little delay before calling DragFiles() ruins the whole thing (at least the experience). Also that calling it from a thread will not work. So yeah, it can't be used at all in my situation, damn Windows.
EDIT 2:
But I actually used my brain and came up with this:
http://www.purebasic.fr/english/viewtopic.php?t=37325
Oh, well I can't use it then. Because my program will need to download the files in the background (thread) and that can take several minutes, I don't want to freeze the program before I call DragFiles(). And if I do it in a thread (the whole start the downloads and call DragFiles() stuff) then I can't know that DragFiles() will get the right information anymore when it finally executes can I? Because I can have dragged files to lots of other folders in the meantime.freak wrote:Just put your files on the local disk first and then call DragFiles(). This is the way other programs are doing it as well.
Guess I'll need to find a way to "hook" into the window by using its handle and see if I can get any useful information that way.
EDIT:
Haha, my experiments shows that a little delay before calling DragFiles() ruins the whole thing (at least the experience). Also that calling it from a thread will not work. So yeah, it can't be used at all in my situation, damn Windows.
EDIT 2:
But I actually used my brain and came up with this:
http://www.purebasic.fr/english/viewtopic.php?t=37325
I like logic, hence I dislike humans but love computers.