I have just discovered (I'm probably really late to this game) that one can create Launchbar actions which trigger specific KM macros or invoke palettes of KM macros.
For example, I created a LB action called "URL Preview" which triggers a KM macro (which I posted about here) which pops up a web browser window using the URL in the clipboard.
I am gobsmacked. I will use this. I would still need to create specific actions for some macros, because I have a number of macros which have the same name, but are distributed in different app-specific palettes.
No, the value is not there to trigger a specific macro. It’s the macro UUID you see in the template that triggers the corresponding macro with that UUID.
The value is what gets passed to that macro. It can be used by the macro itself. The value (from the LB search template) will end up in the %TriggerValue% token of the launched macro.
In my example I used the value to set different options for the "Trigger Macro by Name" action:
You launch it as you launch anything in LB: by typing the fuzzy character sequence that leads you to your action. Initials serve best.
For example, if you have named your serch template “Speak Something via KM” then it should be sufficient to type “ssk”. If not on top of the results, it should be near the top of the results.
Unless you have already 30 other actions that respond to the same initials Then it might take two rounds of training for LB.
Thanks, Tom. I had just figured it out, but your post is better, and reminded me to use the initials (first letter) of each word in the LB search name.
LaunchBar is excellent. If your typed string doesn’t bring your desired target to the top, scroll down and select it (and run it — just double-click or after selecting type {return}). LaunchBar will “learn” your preference over time. If you’re impatient and disciplined enough to use the same typed string, it’s 20-seconds work to assign a string to a target.
Yes, initials are often recognized instantly when you have created a new action. But basically any fuzzy abbreviation —somehow related to the name— will do. You just might have to "insist" 1, 2 or at most 3 times, and then LB will have gotten it.
With "insist" I mean: typing the fuzzy abbreviation (e.g. in the above case "spso" instead of the "ssk" initials) > LB will not list the action at the top > you select it manually from the list.
I often change my abbreviations this way, especially when I add new actions with a similar name, or when my brain insists in memorizing something different from what I had planned
The flexibility of those abbreviations is one of the reasons I love to work with LB. Even if I forgot how exactly I named my action 3 months ago, and I type a vaguely resembling abbreviation, chances are good that the action will be found. Not at position 1, but it’s in the first 10 or 15 or so.
Trying this with a fixed modifier-hotkey-based system will make you cry and die in madness…
BTW, over at the LB forum I posted some tips about reasonable LB usage, in the context of memory/energy consumption and Index size.
O you made me look it up, just for completeness sake .
After typing string in LaunchBar, “{Right-click target} ▹ Assign Abbreviation”.
For some reason my experience differs from Tom’s — my fuzzy abbreviation bring up faggots of chaff and rarely a kernel (it is likely I am having LaunchBar index too many items). I assign abbreviation wantonly … and remember them. YMMV.
I just played it through with the mini example from above (search template “Speak Something via KM”):
I launched it a dozen times with the ssk abbreviation (Speak Something via KM) to make sure LB has deeply learned it.
Then I tried it with spso (Speak Something via KM)
On position #1 on the first try
Now with sst (Speak Something via KM)
1st try: position #2 → Selected it manually from the list → 2nd try: position #1
Now with ss (Speak Something via KM)
1st try: position #3 → Selected it manually → 2nd try: position #2 → Selected it manually → 3rd try: position #1
Now with km (Speak Something via KM)
1st try: #4 → Selected it manually → 2nd try: #1
Now with thing (Speak Something via KM)
1st try: #14 → Selected it manually → 2nd try: #1
Of course, the exact behavior depends heavily on the names of your other actions, search templates, files and indexed items in general.
And —as you have said— the total amount of indexed items will play a hefty role: each item in your index is competing for top position when you type an abbreviation. So, for example, if you have a plethora of indexed files/folders with a similar name, it will take some more training rounds to filter out the rubbish and get the desired result.
So: Get rid of anything in your index that you don’t use somewhat regularly. (To find the last file in the last corner of your disk use Spotlight or EasyFind.) Besides making your abbreviations more efficient LB will thank it to you also by consuming less memory and energy.
If you start doing that on large scale you’re giving away one of the best features of LB, it’s capability to learn. What a pity!
IMO, assigning fix abbreviations makes sense in some edge cases where the abbreviation really has nothing in common with the actual name of the action. For example if you would insist to use the abbreviation 123 to launch the “Speak Something via KM” search template.
I am currently venturing into launchbar and am also looking for an easy way to access KM macros from launchbar. Something that could preferably add KM macros to the main index so you can assign a abbreviation to it.
I am currently using the Action linked in the first post and it’s working great. I can do km <macro name> and it executes it, but I can’t assign a abbreviation to the subsearch. I want in the best way possible just do <mcn>.
Here an up-to-date example (with KM9’s new OCR) to demonstrate how wonderfully LaunchBar’s Search Templates work for launching KM macros with (or also without) a trigger value:
Hm, I think it’s all explained. Search Templates are an integrated feature of LaunchBar, nothing to install (they are normally used for search engine searches and such). See also the linked post where I first mentioned Search Templates as KM macro launchers.
If it’s still unclear, feel free to ask.
Edit:
Ah, in case you are asking because of the “KM Macros” group (in the LB side bar):
I created it to not mix my KM launchers into the “regular” web search templates. You can create a new group of Search Templates with the “Plus” button:
But this is optional. You can also add your KM launchers to your other Search Templates.