Help with dragging files from point A to point B

Hello everyone. I'm doing a rather complex hack, running Instagram inside an android emulator so that I can get some kind of scripting action done via AppleScript and KM. One issue I'm having is, to get the image files inside the android emulation box, I need to drag them from the Finder into the android window. This works 100% of the time if I drag manually, but I just can't get it to work with KM.

Here is what my screen looks like

The file on the left needs to be dragged into the right window. All windows are set in place so I can do it with pixels...though sadly KM just isn't picking up the file and dragging as it seems like it should. My script is below...

So my question is, is there a "magic bullet" that makes dragging objects work better? Can anyone else think of a way that I can push the files into the emulator so they'll receive them, as if they had been dragged?

The emulator itself is android studio, and of course it's not very savvy about things like AppleScript. The emulator doesn't even seem to have a process I can manipulate, although KM is able to see it and bring it to the front. Are there any "backdoor" ways of talking to processes the Mac doesn't actually see? Maybe some way so talk to a process ID directly and make it "open" (receive as a transfer from the Mac)

I do not have any help in regards to dragging the file.
But I just read that Instagram has made a mobile web-page, which lets you upload.
And you can use it on your Mac by going to and set your Useragent to iPhone.
Then you should be able to upload images this way.


1 Like

Interesting, I will check this out ASAP and post results here.

Wow, thank you VERY MUCH for that suggestion. 99% of my. Instagram posts are now done with Safari, and scripting. It’s much easier than what I was going to do before. I still have to run my emulator for video/gif posts, but it’s not bad at all. You saved me tons of work!

1 Like

Glad it worked out.
Could you mark my post as a solution, so others finding this thread can see what solved the problem?