On 10 Nov 2021, at 7:59, Quicksilver wrote:
> Hello, how to use Current Selection object in Triggers?
It should be as simple as searching for Current Selection in the first pane of the Trigger builder in Preferences.
> For example to open currently selected file with an application.
That depends may or may not work. When you ask for the Current Selection, Quicksilver will first check to see if a plug-in provides special behavior for the current application. For example, Quicksilver’s Finder plug-in includes custom AppleScript to return the selected file(s). The iTunes plug-in (when it worked) could return the selected track or playlist.
If that fails, it will do the equivalent of copying the selection with ⌘C. That works in some Cocoa applications without special code. For example, in TextMate you can select text in the editor or a file in the file browser and get the expected thing from Current Selection. This is unlikely to work in an Electron app.
--
Rob McBroom