Dropbox

Description:
[what your script does]
Copies any item in Quicksilver's first pane to your Dropbox public
folder.

Where to Save:
[~/Library/Application Support/Quicksilver/Actions]

Usage:
[Instructions on how to use the script]

To use this script:

1. You need to edit the location of your Dropbox public folder in the
script.
In the script below, you will see a line
set ifolder to "here:Dropbox:Public:"
replace it with the location of your Dropbox Public folder.
e.g. (set ifolder to "firstdrive:backup:Dropbox:Public:")

2. You need to find your Dropbox id. To do so, just go to your Dropbox
public folder and observe the URL of any file that you have placed
there by control-clicking the file and then clicking Dropbox >> " Copy
Public Link".
e.g if the link is http://dl.getdropbox.com/u/872780/
then 872780 is your Dropbox id.

In the script below, you will see a line
set dropboxID to 872780
replace it with your Dropbox id.

Code:
[the script code]


using terms from application "Quicksilver"
        on open thefiles
                set ifolder to "here:Dropbox:Public:"
                repeat with afile in thefiles
                        tell application "Finder" to duplicate afile to folder 
ifolder
                        set afile to afile as text
                        set thename to name of (info for file afile)
                        set thename to my changename(thename)
                        set dropboxID to 872780 --Set your Dropbox ID here.
                        set the clipboard to "http://dl.getdropbox.com/u/"; & 
dropboxID &
"/" & thename
                end repeat
        end open
end using terms from

on changename(thename)
        try
                set AppleScript's text item delimiters to " "
                set thetext to text items of thename
                set AppleScript's text item delimiters to "%20"
                set thetext to thetext as string
                set AppleScript's text item delimiters to ""
                return thetext
        end try
end changename
or download the script from here:
http://dl.getdropbox.com/u/872430/Dropbox(Public)%20.scpt

Reply via email to