Home > General, Personal Project, Programming > Installing publicLink quicksilver + dropbox action

Installing publicLink quicksilver + dropbox action

First you have to open the "applescript editor EDIT:(or script editor)" and copy
the code available here. Change both properties and save
it on the specific location with the name "publicLink"
and your done. Use quicksilver to search for a file that you
know that it's on your public folder and then press tab
and then type "publicLink" and then press enter.
You will have on your clipboard the link ready to be shared! 


EDIT* the final step is to restart quicksilver

Where to save:
~/Library/Application Support/Quicksilver/Actions
Be sure to replace both properties!
to get your public dropbox folder, locate it in the finder
then click get info and on the general tab it says "where"
copy that string and add "/public/"

property ifolder : "/Users/maltigloos/Dropbox/Public/"
property dropboxID : 123456

on findAndReplace2(toFind, toReplace, theText)
set astid to AppleScript's text item delimiters
set AppleScript's text item delimiters to toFind
set textItems to theText's text items
set AppleScript's text item delimiters to toReplace
tell textItems to set editedText to beginning & toReplace & rest
set AppleScript's text item delimiters to astid
return editedText
end findAndReplace2

using terms from application "Quicksilver"
on open theseitems
if application "Dropbox" is not running then launch application "Dropbox"
repeat with aitem in theseitems
tell application "Finder"
set r to POSIX path of (aitem as text)
set completePath to r as text
set docName to my findAndReplace2(ifolder, "", completePath)
set theurl to "http://dl.getdropbox.com/u/" & dropboxID & "/" & docName
set the clipboard to theurl
end tell
end repeat
end open
end using terms from

For more info check this!

About these ads
  1. July 14, 2010 at 4:40 am | #1

    this is probably not a big deal but the correct term for the editor on a mac is Script Editor.

    thanks

  2. Alex
    January 15, 2011 at 8:34 am | #4

    Thanks for this script! Almost exactly what I’ve been looking for. But as I frequently paste Dropbox public links into e-mails or forum posts (screen shots etc.), just appending the file name as it is was not sufficient: spaces or special characters in the file name would lead to broken links. So I added URL shortening via http://is.gd

    Modified version of the script: http://www.pastie.org/1463483

  1. August 13, 2010 at 2:49 pm | #1
  2. August 13, 2010 at 4:34 pm | #2
  3. August 14, 2010 at 2:38 am | #3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: