I'm trying to submit upload a photo to a website via AppleScript.
The basic experience is:
- Load Site [done]
- Click "Upload" [done - triggers Choose File prompt in what looks like the Finder, but still says Safari in top left]
Type file path in prompt and submit using:
tell application "System Events" keystroke "g" using {shift down, command down} keystroke "/Users/myUser/Pictures/myPic.jpg" key code 36 end tell
But instead the AppleScript just stops moving once the prompt appears, and waits for human interaction. How can I use AppleScript to upload an image in a prompt like this?
Demo of the web side of things: http://www.uploadify.com/demos/
Assume I can click the "Select Files" button in this demo via AppleScript. How can I continue to use AppleScript to enter the file path and submit?