More efficient copy and pasting into web forms?
September 27, 2010 8:08 PM   Subscribe

Looking for a program or plugin that will let me select a bunch of data, copy it, and automatically paste it into a web form and automatically fill out all of the fields.

The software I have found on the internet solve similar problems, but are not quite what I am looking for.

Autofill Firefox Plugins - These work great, but they are meant for putting the same data in different web forms. I need different data to go into the same web form.

Clipboard Editors - These let you copy more than one thing at a time, but the paste process requires going through the menu of previously pasted items, which isn't time efficient nor much easier than switching screens and copying / pasting several times.

Macros - Haven't found anything good in this category either.

The data I select can be separated by a return, spaces, or some other unique formatting signature which will allow the program to parse the data into discreet blocks which can be separated into fields in the web form automatically.
posted by banished to Computers & Internet (6 answers total)
It might be easier to write a program that reads the data from a file and then sends it to the web server directly, without the manual step of copying and pasting into a browser. I don't know of a tool that makes it easy to do this without doing any programming, but if you know a programmer who can help you, then it might be very simple (depending on the details of the data source and the web site).
posted by mbrubeck at 8:44 PM on September 27, 2010

This is really simple to automate with scripting. For example, the following takes whatever has been copied to the clipboard, splits it by paragraph and then posts it to the given URL with 'field1' containing the first paragraph and 'field2' containing the second. To find the actual submit URL and the field names of the form just look at the HTML source of the page.

xclip -sel clip -o | perl -0777 -F"\n\n" -ane 'system("curl -F field1=\Q$F[0]\E -F field2=\Q$F[1]\E")'

Note that this example uses xclip to access the X11 clipboard. If you are using Cygwin on Windows then you can simply use "</dev/clipboard". For OS X there is an equivalent to xclip, but I forget the name, possibly xsel.
posted by Rhomboid at 9:40 PM on September 27, 2010

I guess I should add, I was hoping for an off-the-shelf solution. But if someone is interested in making a greasemonkey script or something for this sort of thing send me a mefi-mail with an estimate, and I can send more particulars. But also, I do not have access to the web form's backend, just the front-end form.
posted by banished at 10:30 PM on September 27, 2010

I use iMacro software to do something very similar, though rather than copy pasting each it file by hand it will automatically go through each file in a directory and submit
posted by oblio_one at 10:31 PM on September 27, 2010

I do not have access to the web form's backend, just the front-end form.

If you can submit a form in a browser then you have all the access that you need to script it. Either way it's just a HTTP POST request -- it doesn't matter if the software used to generate it was a scripting language, a command line tool like curl, or a graphical browser. Sure, sometimes you have to do a little digging to find the submit location, but by definition it exists in some form in the page source if the browser can submit the form. In some more egregious cases there is client-side logic that you have to replicate (such as passing login credentials or anti-XSRF tokens) to successfully script the form, but those are straightforward and not hard to deal with.
posted by Rhomboid at 12:21 AM on September 28, 2010

Seconding iMacro.
posted by primer_dimer at 2:08 AM on September 29, 2010

« Older Don't Make Me Turn This Meteor Around!   |   Just a song in the dark... Newer »
This thread is closed to new comments.