Quicksilver

PyActions

What:

Write intermediate actions [1] for Quicksilver using PyObjC, but without having to write a plug-in. All that is necessary (once the set-up is done) is to put together an appropraite Python script, place it in a particular directory, and instruct QS to look at the directory. For the most part, QS doesn't even need to be restarted ;-)

Why:

I think this approach enables an intermediate experience of extending Quicksilver. Writing a plug-in can be a fair bit of detail to manage and writing AppleScript actions (and some of the other alternatives) may not be quite enough for handling certain situations. Also, I'm hoping to reduce the number of times QS needs to be restarted during development. I've reimplemented some actions from some of my existing plug-ins (included as samples) and I definitely experienced less restarting during the process. The reverse direction is also a possibility -- once you're comfortable w/ your code, perhaps you'll want to consider writing a plug-in that is based on your existing work.

How:

  1. Install the PyActions Plug-in (and if you haven't already, the PyObjC Support plug-in)
  2. Assign a hot key to the 'Scan PyActions Directory' trigger via the Triggers pref pane -- FWIW, I use Shift-Option-Command-S
  3. Examine the sample code in ~/Library/Application Support/Quicksilver/PyActions/samples/ -- the simplest sample is probably TestActions.py
  4. Copy at least one of the sample files to the PyActions directory
  5. Modify what you copied a bit
  6. Execute the 'Scan PyActions Directory' trigger
  7. Try out the modified actions
  8. Go to step 2, 3, or 4

Hint: Console.app is your friend

Where:

via PyObjCPluginsUniversalDev

[1] This approach lets you work w/ object types other than just strings or files. If you are only handling strings or files, it may be easier to take another approach such as ExecutableFileActions.