Simulaty a file drag-and-drop into an app Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
madsounds
Posts: 59
Joined: 31 May 2019, 08:14

Simulaty a file drag-and-drop into an app

11 Dec 2020, 10:32

Is there a way to simulate drag-and-drop from AHK2 to an app? Or, more specifically, not drag-and-drop but just drop. I want to tell to a third-party window that there was a file dropped in it.
User avatar
kczx3
Posts: 1648
Joined: 06 Oct 2015, 21:39

Re: Simulaty a file drag-and-drop into an app  Topic is solved

11 Dec 2020, 10:55

I think you'd have to create a drag source and hopefully the target app is registered as a drop target...

Maybe this helps (though it is written in AHK v1) - https://github.com/AHK-just-me/DoDragDrop
madsounds
Posts: 59
Joined: 31 May 2019, 08:14

Re: Simulaty a file drag-and-drop into an app

11 Dec 2020, 12:25

Thanks, seems that it's what I'm looking for. I'll try to convert this to AHK2. Let's hope this won't take more than a year :-)
User avatar
kczx3
Posts: 1648
Joined: 06 Oct 2015, 21:39

Re: Simulaty a file drag-and-drop into an app

11 Dec 2020, 13:09

You’ll also have to program a way to actually put files on the clipboard. That’s a whole other thing...

EDIT: Looks like Lexikos wrote something for this a long while ago - https://autohotkey.com/board/topic/23162-how-to-copy-a-file-to-the-clipboard/?p=150209
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Simulaty a file drag-and-drop into an app

11 Dec 2020, 16:20

If application uses IDropTarget interface it will not be so easy
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=56720

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: No registered users and 43 guests