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!

  1. July 14, 2010 at 4:40 am

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

    thanks

    • July 14, 2010 at 7:34 pm

      Hey, I checked that out and it turns out that “an editor for AppleScript that is included with Mac OS X (was called Script Editor in versions of OS X prior to 10.6 Snow Leopard).”

      http://en.wikipedia.org/wiki/Apple_Developer_Tools#AppleScript_Editor

      So it really depends on what OS you have, thanks for the heads up!

      • July 14, 2010 at 7:52 pm

        Oh, thanks for checking. That is good to know. I do not have 10.6 but using 10.5.8.

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

    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

    • February 7, 2011 at 12:47 pm

      thanks Alex, nice mod! this is great

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

Leave a reply to Alex Cancel reply