Is there a way to simulate drag and drop into window?

Some applications have this allow only one instance option which is convenient.

I am using an tail application that doesn’t support this. But in windows explorer I can drag the file and it open in another tab.

So if I am using powershell I first open windows explorer (ii .), then drag the file into that window. I am wondering if there is a way of doing this directly in powershell. I think I can get the list of windows and match “baretail” against it, but after that I don’t know how to simulate dragging the file into that window.

Thank you for any indication!

Not using PowerShell, no. Not really, not without getting really hacky and gnarly, and even then you’re talking about marshalling complex event objects that live in C++. You can look into AutoIt, though. It might be suitable.