quicksilver/Quicksilver — pull request #1048 by pjrobertson (2012-08-14 18:49:43+00:00)
Title: AppleScript action improvements. Fixes #1023

This adds an `open files` method to Quicksilver's scripting library, for dealing with files.

At the moment, you can send a file from the dSelector to an AppleScript by writing in the AppleScript:

`on open myDObject`

This is somewhat misleading though, as this just uses the AppleScript standard `open` action with things piped from Quicksilver, meaning that doing `on open myDObject with myIObject` builds fine in the AppleScript Editor, but it doesn't run.

Adding a new `open files` method means that you now use

`on open files myDObject with myIObject` in AppleScript (the on open myDObject method still works for backwards compatibility), meaning there's much less ambiguity, since `open files` is defined by QS and will validate the AppleScript.

Along with this, I've fixed a small bug whereby if an AppleScript contained something like `tell Application SomeApp to open`, Quicksilver would think it was a file AppleScript, even if it started with `on process text`

An example of how to use this action:

using terms from application "Quicksilver"
on get argument count
return 2 -- if you want the third pane to be filled, otherwise return 1 (or leave this handler out)
end get argument count
on open files dObject with iObject

tell application "Finder" to move file dObject to folder iObject
end open files
end using terms from