Python Forum
Windows: Put File automatically under Cursor for Drag & Drop - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Windows: Put File automatically under Cursor for Drag & Drop (/thread-1582.html)



Windows: Put File automatically under Cursor for Drag & Drop - sym - Jan-13-2017

Hello, I'm stuck on the following problem and can't seem to find a solution for it. Does anyone know if this is possible?

On Windows I have the directory path for a file.

I would like to have a Python Script which can automatically "put that file" under the Mouse Cursor so I can drop it into another application window.

So basically the effect should be the same, as manually navigating to the File Location and then dragging the file to a new location using drag and drop.


RE: Windows: Put File automatically under Cursor for Drag & Drop - Larz60+ - Jan-13-2017

If you use a gui (tkinter is built in), you can list your files in whatever widget suits your purpose.
Once done, you can set the focus (or index) on the desired target