Quicksilver can be called from AppleScript. Quicksilver can also call AppleScripts and you can attach triggers to these scripts as well. This page provides an overview of the ways you can use AppleScript with Quicksilver along with some useful AppleScripts that users have created in the past.
- 1 Calling Quicksilver from AppleScript
- 2 Pane 1 AppleScripts
- 3 Pane 2 AppleScript Actions
Calling Quicksilver from AppleScript
You can open an object in Quicksilver by setting its selection property in AppleScript. Quicksilver will try to automatically determine what kind of object the text actually represents to show the appropriate actions. Some examples:
tell application "Quicksilver" to set selection to "/"
tell application "Quicksilver" to set selection to "http://google.com"
Pane 1 AppleScripts
These Applescripts are selected in Quicksilver's first pane. Simply select any .scpt file in the first pane and then the 'Run' action.
You can also use AppleScript editor to save a script as an 'Application'. Like any application they can then be selected in the first pane and then run using the the 'Open' action.
Adding Pane 1 AppleScripts to catalog
You can add scripts to your Catalog to quickly find and Run them. Quicksilver by default adds the scripts it finds in ~/Library/Scripts and /Library/Scripts. You can add more locations by adding a 'File & Folder Scanner'.
Using TextAction AppleScripts in Pane 1
Any Text Action AppleScript (see below) can also be used in the first pane. When you select a Text Action AppleScript in the first pane instead of getting the Run action you will get the "Process Text..." action and be prompted for the text in the third pane. This can be very useful for making Triggers for TextAction AppleScripts.
You may also want to consider adding a "'~/Library/Application Support/Quicksilver/Actions/" File & Folder Scanner Scanner to your catalog so that Text Action AppleScripts can be quickly selected.
Example Pane 1 Scripts
These simple scripts take no arguments. Copy them into AppleScript Editor and then save them as .scpt files.
Color Picker (AppleScript) - displays the color picker from any app
Pane 2 AppleScript Actions
Action Applescripts are actions you can select in Quicksilver's second pane for certain first pane types (the script determines what types).
To install a scripts, save it in ~/Library/Application Support/Quicksilver/Actions/MyActionName.scpt where MyActionName is the name the action will have in the second pane, and ~ is your user's home folder. Then relaunch Quicksilver. Create the Actions folder if it doesn't exist.
See the AppleScript Actions page for information on writing your own actions.
Text Action AppleScripts
- Send emails directly from Quicksilver using Sparrow.
- Send tweets directly from Quicksilver using SuperTweet and twitter.
- Encode/Decode URL
- Convert between encoded and unencoded URLs (%20 <=> space, %26 <=> & ,etc).
- Display Growl
- Displays a Growl Notification for your inputted text
- TaskUnifier AddTask
- Adds a task to TaskUnifier
File Action AppleScripts
- Dropbox public link
- Gets the Dropbox public link URLs for files in your Dropbox Public folder.
- Paste file path
- of the file in the first pane.
- Shorten URL
- Makes a short link from a URL in the first pane (and optionally on the clipboard). Multiple versions posted.
- Combine PDFs
- Combines pages from multiple PDFs into a single document.
- Select File In Dialog
- Allows you to use Quicksilver to select a file in an Open/Save dialog box
Miscellaneous Action AppleScripts
- Mosh (AppleScript)
- Use data from the Remote Hosts plugin to automatically Mosh into a host
- Run command in shell with arguments
- Runs a text command entered in the first pane using the file or text arguments entered in the third pane.
- Convert Units To...
- Takes a value with units in the first pane, and converts it to the units entered in the third pane.
- Quick Look
- for multiple files in the same Finder folder (obsoleted by native QuickLook support in QS)
- Quick Quick Look
- for multiple files in different Finder folders, although the mouse is needed to navigate the Quick Look window
Write your own AppleScript actions
To learn how to write your own AppleScript Actions for Quicksilver, see AppleScript Actions.
For convenience, you can start using one of the AppleScript Action templates.