Paste Clipboard to Dropbox with DOpus

One thing I keep doing over and over again is taking screenshots to share with friends, colleagues, forums and so on by hosting it online. To make that process as quick and streamlined as possible I’ve setup a button to automate this in my file manager of choice, Directory Opus.

I used to use my own web server and FTP to host the images, but nowadays I’m using the excellent free service Dropbox for this, and for many of my other file sharing needs. If you don’t already have a Dropbox account, you can use the previous link to signup. It’s a referral link which gives you (and me) an extra 250 MB of storage for free in addition to the original 2 GB you get.

When I’ve a screenshot in my Clipboard I want a button in DOpus to perform the following:

  1. Paste it to my Public Dropbox folder as a high quality JPEG.
  2. Give the image a name of my choice.
  3. Copy the URL to the image to my Clipboard, ready to be pasted into Messenger, Skype, a forum etc.
Dropbox Button in DOpus

I’ve my screen grab application mapped to the keyboard shortcut Win+S to, so I can at any time drag out a rectangle on screen that goes into the Clipboard and then run the function in DOpus to be able to share it immediately.

Here’s the script I’ve added to my button:

@set url =<dropbox id>/
@set dropbox = E:\User Storage\Dropbox\Public\
@set imagequality = 90
@set imagefile = {dlgstring|Set image name (without extension)}

Clipboard PASTE jpg:{$imagequality} AS="{$dropbox}{$imagefile}.jpg"

Clipboard SET {$url}{$imagefile}.jpg

@confirm Done! URL copied to clipboard.|Okidoki

When you press the button, you get asked for a name to give the file, and then it copies it to your dropbox, and stores the URL in the clipboard and gives you a confirmation. Change the @set url line to use your own dropbox id so the URL stored in the clipboard is correct, and also change the path in @set dropbox to your public dropbox folder.

If you rather prefer to use your own FTP and web server instead of Dropbox, here’s my old button script that I used before I switched to Dropbox, feel free to use that as a starting point to tweak to fit your needs.

@set url = http://your.domain.address/
@set tmpfolder = E:\User Storage\Downloads\
@set imagefile = {dlgstring|Set image name (without extension)}

Clipboard PASTE jpg:90 AS="{$tmpfolder}{$imagefile}.jpg"

Copy FILE="{$tmpfolder}{$imagefile}.jpg" TO=@your-ftp-site-dopus-profile-name

Delete FILE="{$tmpfolder}{$imagefile}.jpg" QUIET

Clipboard SET {$url}{$imagefile}.jpg

@confirm Done! URL copied to clipboard.|Okidoki

Enjoy and have some fun with the precious time saved for each image shared. Cheers!