

Ask HN: Implementing Auto-Copy - mikeyur

I've been scratching my head and Googling the last couple of days looking for a way to implement auto-copy into a project. We've tried using the clipboard implementation which basically uses a small flash file to copy, only problem is that it breaks in Flash 10.<p>Need some help from the hackers, I'm all out of ideas.<p>EDIT: I wasn't that clear, sorry. Basically I have a url shortening script and I want someone to be able to shorten a url, be redirected to a page and have that short url they created auto-copied to their clipboard - so they can just close the window and paste the link easily.
======
hopeless
<http://url.ie> (another url shortening service -- do we need yet more???!)
does exactly what you want. I believe it's just javascript but you can check
the page source for yourself

~~~
mikeyur
We know. I can name 5-10 services off the top of my head that do the same
thing we're doing. This is more of a personal project, not a major site trying
to compete with the likes of tr.im is.gd tinyurl etc.

We are planning on releasing the code once we finish it up so anyone can host
a url shortening service on their own site. Just another stupid weekend
project :)

Back to url.ie and their url copying - it uses the flash implementation
meaning it breaks for anyone with Flash 10.

------
ivank
You would have to somehow get the user to click on the Flash object. I
wouldn't rely on Flash for the user experience, though. What YouTube does is
probably best (an input box that selects all on click). People are probably
most familiar with that method.

Even better would be to figure out a workflow where the user doesn't have to
copy, or paste anything.

~~~
mikeyur
We actually have that right now, the box selects all when you click it:
[http://www.grabup.com/uploads/3fa8b2cde15df8314a8ce242451b03...](http://www.grabup.com/uploads/3fa8b2cde15df8314a8ce242451b039d.png?direct)

Just thought it would be nice if there was an auto-copy function - so
shortening with our bookmarklet and copying took just 1 click.

------
kaens
Auto-Copy as in the firefox extension? Or what?

I think you're going to need to be a bit more specific here.

~~~
mikeyur
Sorry about that, updated.

------
pclark
I like the idea of a popup box and making the cursor ideally select all the
text.

------
pclark
oh and could you make your bookmarklet popup in a new window? never got why
people didnt do that.

