Page 1 of 2

Integration with Keyboard Maestro

Posted: Fri Feb 04, 2011 2:47 pm
by macdrifter
The integration of Launchbar with Keyboard Maestro could bring some real power to the Mac. Much needed power if Quicksilver is going to find a successor. I've contacted the Keyboard Maestro devs and they tell me there are already hooks for Launchbar to use if the Objective Development wanted to add them:
...I'd be happy to make all the currently available macros available to Launchbar for them to use if that was something they wanted to display. You'd have to ask them if they want to display them.


This just seems like a natural integration. Launchbar can do a lot, by Keyboard Maestro fills a lot of gaps that would take significant Applescripting to do in Launchbar. Of course there is a workaround to make a bunch of Applescript files that call Keyboard Maestro macros but that's an ugly hack.
I hope the developers read this forum. I know this thread exists else where in the forum, but that thread devolved into a conversation that was non-productive and dev or moderator never chimed in with a comment.
I'm new to this forum and it does not seem obvious that the devs provide feedback to threads that often, so please comment if you think this is a worthwhile integration.

Re: Integration with Keyboard Maestro

Posted: Fri Feb 04, 2011 9:38 pm
by signupsammy
+3 for this. Love me some Launchbar. Love me some Keyboard Maestro.

Re: Integration with Keyboard Maestro

Posted: Sun Aug 07, 2011 7:29 pm
by blafusel
+3 from me too. that would be amazing!

Re: Integration with Keyboard Maestro

Posted: Wed May 29, 2013 9:15 pm
by aekorps
+1 from me

Re: Integration with Keyboard Maestro

Posted: Wed May 29, 2013 9:44 pm
by Was
+1 from me, this would be brilliant!

Re: Integration with Keyboard Maestro

Posted: Fri Jun 14, 2013 9:01 am
by iaj
+1 +1 +1
:mrgreen:

Re: Integration with Keyboard Maestro

Posted: Fri Jun 14, 2013 9:58 pm
by Nik
*bump*

+1!

Re: Integration with Keyboard Maestro

Posted: Sun Jun 16, 2013 9:39 am
by andrej
+3 for this. Yes!

Re: Integration with Keyboard Maestro

Posted: Mon Jun 17, 2013 10:59 am
by jsturtridge
Ditto; this would be fabulous.

Re: Integration with Keyboard Maestro

Posted: Thu Jul 04, 2013 2:08 pm
by Was
Devs, any comment? It's been nearly 2 and a half years since the original request...

Re: Integration with Keyboard Maestro

Posted: Tue Jul 09, 2013 5:40 pm
by dbyler
+1

Re: Integration with Keyboard Maestro

Posted: Thu Dec 05, 2013 10:41 am
by Kicweed
I'm not beating a dead horse here, I've possibly found something really useful.

Someone has integrated KM with Alfred and has open sourced his approach. It might have useful bits that we could use to integrate KM with Launchbar.

He seems to be using AppleScript to get the available macros from KM and then he parses them into Alfred's database with PHP.

Though I'm not well versed in Alfred's innards nor in PHP, but the whole process seems quite simple to adjust for Launchbar.

Re: Integration with Keyboard Maestro

Posted: Thu Dec 05, 2013 9:50 pm
by jimmyhartington
I just also read the article about integration with Alfred (by the way of Gabe, which started this thread :D ).
And thought this could be nice for Launchbar.

Unfortunately I do not have the skills to make it from the opensourced materiale, so I hope the developer will jump on this to make it happen.

So +1 from me.

Re: Integration with Keyboard Maestro

Posted: Fri Dec 06, 2013 3:37 pm
by Kicweed
I've had a look through the source code. I think I've got the steps sorted:

1. info.plist: It's the place where it all starts and ends. On line 43 it runs main.php with the user's query as the parameter:

Code: Select all

/usr/local/bin/php -f main.php -- "{query}"


2. main.php: On line 30 it runs km.scpt to get from KM the available macros details (name & hot keys, I think). Then, it finds which macro name best matches the user's query and returns that name back to info.plist.

3. info.plist: On line 68 it tells KM to run the macro with the name returned by main.php.


The above is a trivial process, the only problem is how to bring the list of available macros inside LB's index. Alfred queries KM every single time the action is run, by using 2 different languages (PHP and AppleScript). This is not practical and it would slow LB down. The PHP part could be avoided altogether if LB can automatically scan and index KM's macros. Also, parts of what main.php does can be done much better by LB i.e. the name matching.

I'm not on my Mac right now so I don't know how easy that would be. According to the official KM wiki, the macros are stored in a .plist file. It shouldn't be that hard to parse it and include it in the index. Running the macros is a 3 line AppleScript call:

Code: Select all

tell application "Keyboard Maestro Engine"
  do script MacroNameString
end tell

Re: Integration with Keyboard Maestro

Posted: Sun Dec 08, 2013 1:29 pm
by Was
Any chance the devs could implement this officially for the next release of Launchbar?