In OSX, I need to automate dragging a file from a finder window into a pane of an application; can I do this with Applescript?
January 2, 2004 9:03 PM   Subscribe

Applescript help...

In OSX, I need to automate dragging a file from a finder window into a pane of an application. If need be, I can pin the two windows such that there X and Y locations are constant. Any idea how to script the drag from one to the other? Quickeys is not an option and Apple's UI scripting doesn't seem to handle it.
posted by machaus to Computers & Internet (3 answers total)
Which applications are you working with? What kinds of files?
posted by Mo Nickels at 7:51 AM on January 3, 2004

AppleScript isn't really for automating UI actions (even though Apple has introduced GUI scripting to quiet those who have been clamoring for that). What you want to do is tell the application (or the document) to insert the file you want to drag at a particular location. If the application has exposed this capability for scripts, you can find the correct terminology in its dictionary. If it hasn't exposed this for scripts, you're basically SOL.
posted by kindall at 1:32 PM on January 3, 2004

Response by poster: Yeah, I tried various osaxen, and even found some that could move the mouse and simulate clicks, but none could click and drag the mouse. It'll have to be quickeys, as using the menu driven import method with Apple's UI scripting is prone to failure and adds about 15 seconds to the task. That times several hundred repetitions eats up a chunk of man hours.
posted by machaus at 6:37 PM on January 4, 2004

« Older Multiple family living arrangement?   |   What's living in Portland like? Newer »
This thread is closed to new comments.