It depends on the script:
If you have a script that already gets the Finder selection by itself, then you don’t need to “send” it.
A typical example for that would be an AS with…
tell application "Finder" to set theItems to selection as alias list
But otherwise the “Sending” is very handy because it provides the argument(s) for any script:
For example in a Perl script you can grab the arguments (= the items sent to LB) from @ARGV
:
for (@ARGV){
say "$_";
}
or in Bash from $@
:
for ARG in "$@"; do
echo "$ARG"
done
Also very useful for running scripts on text selections in any editor, since you can “send” the text to the script without having to bother with the clipboard.
For example in AS by using the handle_string
handler:
on handle_string(_string)
return [{title:"1 string passed"}, {title:_string}]
end handle_string
See here for more details.
And of course you can send not only Finder items or selected text, but also something from LaunchBar itself. For example a file/folder you have selected in LB’s file browser, or the result from another action, etc.
PS:
To make it more clear, this is what you send with the “Instant Send” key: