1

I would like to create an AppleScript to open a specified URL in Safari, login automatically if that would be possible and then upload a file to a form that accepts drag and drop file upload.

Would it be possible to automate that event using AppleScript?

  • What are you trying to achieve? Is there a reason you want to do this with Safari in particular? Is there a reason you want to use AppleScript? – AllInOne Aug 15 '14 at 16:41
  • I am uploading a file on a regular basis using this form and would like to automate it. I know that it would be easier using Google Chrome (it handles JS better than Safari) but I need to do it on Safari. – syntagma Aug 15 '14 at 16:48
  • You can try to use Automator's "Watch me do" (it saves your mouse and keyboard events) and you can replay it later. Thing like this are Site specific, so can't give more precise answer. – jm666 Aug 15 '14 at 19:08
  • You probably will not get a concrete answer with out a link to the site or the upload form – markhunte Dec 21 '14 at 12:39
1

It is going to be a headache to attempt to do this is automator or applescript, i would recommend using python with the splinter library, it is much easier to use then objective c or swift for this. Here is a link, https://splinter.readthedocs.org/en/latest/

It is possible to set it to run 100% in the background with a hidden browser or get it to open up something like firefox for you :P should be doable in under 10 lines with python, python comes preinstalled with osx and the splinter lib is easy to add into it with pip

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .