Home > General, Personal Project, Programming > publicLink: the process

publicLink: the process


In this post I will explain the process of my action/script for quicksilver. The action is quite simple; you choose a file that is currently on your public folder via quicksilver and then run the publicLink action to get the public link and paste it anywhere you need it.

The problem:

I started using Quicksilver and loved functions like move to and copy to. Then I started using dropbox and using the copy to and move to the dropbox folder. The problem was that I had to manually get the public link for any file in the dropbox folder. This was very disruptive when you are used to using quicksilver and its simple functions. Also, I always had to get the main index file from my dropbox folder (search: pyndexer) so it was not productive getting the same link over and over again manually.

The usual solution:

Search. I started searching for the solution but I had no luck. So I decided it was time to use my programming skills and make it myself.

First step:

I searched for the requirements for a quicksilver script. I found that you needed applescript knowledge. This was the first time I heard of this scripting language so I decided to read a couple of things and look for examples.

I came across three vital webpages that I used for my solution.




I knew I needed a find and replace algorithm so I decided to search for a pre-made one. The first link was useful for seeing how to interact with the clipboard. The third link was useful for seeing different examples and one script very similar to my solution but different at the same time.

Testing the work:

When I finished my script, I didn’t worried about a method to see if there were characters not used in URLs like spaces and other symbols. I decided to try it and see how it worked without it. It worked! It turns out that most browsers (if not all, I tried with 3) replace this characters when pressing enter and it redirects you to the correct webpage. I did a quick test to see different types of names of the files and everything worked.

The solution:


What I learned:

I learned that it’s pretty awesome to develop your own solutions. I felt powerful. Also I wanted to share the solution if somebody else needs it. It’s pretty cool what you can achieve in a long night with some searching skills and basic developing knowledge.

  1. September 7, 2010 at 7:00 pm

    Need some help on this project. My apple script gives me the wrong link:


    That is the link I got, but the correct link should be


    Any ideas?

    • September 11, 2010 at 12:20 pm

      Yes, I think you need to modify the script. Open it with the script editor and the wrong is where it says:
      property ifolder : “/Users/maltigloos/Dropbox/Public/” (or whatever is here)
      change it to
      property ifolder : “/Users/nicholas/Desktop/”

  2. September 11, 2010 at 8:30 pm

    Thanks, that worked, but it also added a forward slash to the link


    not that it matters, but the double forwardslashes seem weird

    • September 15, 2010 at 12:00 am

      That’s weird I suggest that you check again the property ifolder and add and “/” at the end and see if that works.

  1. No trackbacks yet.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: