Jump to content

Alfred Maestro - Keyboard Maestro Integration For Alfred


Recommended Posts

On 10/17/2019 at 10:33 PM, Kirill Maltsev said:

One of the workflow maintainers here. Sorry for the inconvenience! I haven't upgraded to macOS Catalina yet, so can't test myself. I've created a Github issue for fixing that, though.

 

I don't think there's anything you can do about it, but @deanishe linked to a solution (several workflows have this problem with Catalina): 

 

Link to comment

Hi guys,

 

I've been using this amazing workflow for a while now, but since recently I noticed it was not finding some of my KM macros.

For example, I have a macro called "journal", and this is what I get when I type "km journal"

 

[06:14:22.602] Logging Started...
[06:14:24.247] Alfred Maestro[Script Filter] Queuing argument ''
[06:14:24.486] Alfred Maestro[Script Filter] Queuing argument 'j'
[06:14:24.596] Alfred Maestro[Script Filter] Queuing argument 'jo'
[06:14:24.663] Alfred Maestro[Script Filter] Queuing argument 'jou'
[06:14:24.730] Alfred Maestro[Script Filter] Queuing argument 'jour'
[06:14:24.895] Alfred Maestro[Script Filter] Queuing argument 'journ'
[06:14:24.989] Alfred Maestro[Script Filter] Queuing argument 'journa'
[06:14:25.143] Alfred Maestro[Script Filter] Queuing argument 'journal'
[06:14:25.760] Alfred Maestro[Script Filter] Script with argv 'journal' finished
[06:14:25.763] STDERR: Alfred Maestro[Script Filter] 🍺
06:14:25 workflow.go:307: ------- Alfred Maestro/0.2.2 (AwGo/0.17.0) -------
06:14:25 files.go:66: [ERROR] delete tempfile "~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/iansinnott.keyboardmaestro/kmMacros844108717": remove /Users/mac/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/iansinnott.keyboardmaestro/kmMacros844108717: no such file or directory
06:14:25 feedback.go:441: Sent 1 result(s) to Alfred
06:14:25 feedback.go:431: Feedback already sent. Ignoring.
06:14:25 workflow.go:387: ------------------ 523.388931ms ------------------
[06:14:25.804] Alfred Maestro[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "IDPNHJLHDVTMM0LUJ2S6IYAX"
  },
  "items": [
    {
      "title": "No macros found",
      "subtitle": "Try a different query.",
      "valid": false,
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"
      }
    }
  ]
}

The macro is definitely present in KM, active and working properly.

This is just an exemple, there are many many more macros that the workflow is not finding (but he's finding some).

 

What am I missing ?

 

 

Link to comment

Hi Mehdi,

 

Can you please open a new issue in our repository? So this thread doesn't get cluttered with the debugging info. And then can you run these two scripts (get_all_km_macros.scpt and get_hotkey_km_macros.scpt) locally to see if your macro is present in the output?

 

To run the script open terminal and type

osascript get_all_km_macros.scpt
osascript get_hotkey_km_macros.scpt

 

Edited by Kirill Maltsev
Markdown isn't supported, had to reformat
Link to comment
On 10/27/2019 at 12:01 PM, Kirill Maltsev said:

Hi Mehdi,

 

Can you please open a new issue in our repository? So this thread doesn't get cluttered with the debugging info. And then can you run these two scripts (get_all_km_macros.scpt and get_hotkey_km_macros.scpt) locally to see if your macro is present in the output?

 

To run the script open terminal and type


osascript get_all_km_macros.scpt
osascript get_hotkey_km_macros.scpt

 

Thank you Kirill for your answer.

This one is on me, the Group containing the macro was disabled that's why it wasn't appearing, your scripts helped me figure that out 🙏

 

Mehdi

Link to comment
On 8/29/2015 at 3:32 AM, Smith007 said:

$macros[] = $macro;

 

Can you guide me to where exactly I can find this line? I don't have much experience with Alfred workflows...🙈 Any help is appreciated, as I would really like to exclude some macros in Alfred. Cheers, everyone.

Link to comment
3 minutes ago, patowod said:

Can you guide me to where exactly I can find this line?

 

It's long gone. The workflow was rewritten in Go last year.

 

As best as I can see, there isn't a way to (easily) exclude macros. The workflow learns from your usage, though, so macros you never run from Alfred will naturally drop to the bottom of the results.

Link to comment
  • 1 year later...

I have looked at Github issue here https://github.com/iansinnott/alfred-maestro/issues/26 regarding Big Sur.

 

My issue is a bit different and involves compatibility with M1 Macs. The Alfred-Maestro workflow doesn't even trigger on my Apple Silicon M1 Mac mini. It is enabled, and the trigger is typing "km" in Alfred. But when I do that, it appears not to trigger the workflow, and all Alfred finds is other things, like Keyboard Maestro itself. 

 

It is possible that the workflow is being triggered, but fails--I don't know how to tell. The workflow uses a compiled binary "Alfred-Maestro" in the workflow directory. This is x86 compatible, not a universal binary. It is compiled by Go. This executable, when run from terminal on Big Sur 11.01 on my Apple Silicon based M1 Mac mini using Rosetta (arch -x86_64 ./alfred-maestro), gives a segmentation fault. I assume, since Alfred version 4.21 is not universal, and therefore runs under Rosetta, that everything it spawns will be run under Rosetta, including workflow stuff.

 

I have compiled a number of programs I use frequently as ARM native. However, in this case, I have read of a lot of complexity in using Go on Apple Silicon and am a bit reluctant to dive into the weeds on this one. Also, since Alfred is not yet ARM native, I'm not sure building Alfred-maestro as a universal app would fix this. But I do miss this workflow and it is the only thing I use daily that I haven't been able to get to run on the M1 Mac mini. 

 

Do you have plans to look into this, or can you make suggestions as to what I could do?

 

 

Link to comment
7 hours ago, deanishe said:

 

Use Alfred's debugger.

 

 

ARM-based macOS isn't supported yet. Wait for Go 1.16.

thank you! I should have found the debugger on my own, but oh well. It does show what I expected, which is that Alfred does call the workflow, but the executable causes a segmentation fault. I will create a new issue in the GitHub repository.

Link to comment
  • 11 months later...
  • 2 years later...

I downloaded the Alfred Maestro workflow from here: https://github.com/iansinnott/alfred-maestro/tree/master

 

It only find macros to run if there is no space at end of macro name. For example, say Keyboard Maestro macro is called 'Search Google', it will find the macro if I type in 'km Search Google' but will not find the macro if I add a space at end like this 'km Search Google '.

 

How can I get it to find the macro even if I add a space at end?

 

(this might seem all a bit pointless, but its quite important for how I name and find the macros).

Link to comment

Are there user that are using both Alfred and Keyboard Maestro? What are things that can be acomplished via KM over and above Alfred. I find Alfred easier to use and maintain especially with Gallery addition in version 5.

 

Is it worth exploring KM macros? it will be good to get some advice from user that use both and learn few use cases of KM that Alfred can't do easily.

Link to comment
3 hours ago, TomBenz said:

Are there user that are using both Alfred and Keyboard Maestro?

I suspect there are many users who use both (as I do). Both use differing approaches so it's very much "horses for courses” (i.e., you choose whichever is better suited for what you wish to do).

 

I can give one or two personal examples—but remember these are my personal views and no indication of one app being better than the other.

  • There was an Alfred workflow to send to Roon, when Roon was running the background, the keystrokes necessary to increase or decrease the volume of the music playing. That workflow stopped working for me. When I recreated it in Alfred by manually passing the keystrokes Roon came to the front on each relevant key press. I then created a macro in Keyboard Maestro which worked perfectly (without bringing Roon to the front when I was trying to change the volume).
  • However, on the other side of the coin, the way Alfred works by typing just a few letters to get what you want (be it a file or a workflow) is wonderful and saves having to remember all the various Keyboard Maestro triggers (or using a lot of macro palettes or the status menu). In that context Alfred's Universal Actions are unbeatable (in my view).
  • It's easier in Keyboard Maestro to use input forms and specifically designed output screens—which can be useful for some things which I need to do.

For what it's worth, I use Alfred principally and Keyboard Maestro for various specialist things which I can't otherwise easily achieve in Alfred. The only way you can really answer your question is to look for yourself, I'm afraid. Everything depends on exactly what you want to achieve: each application has its own advantages and benefits. I have never regretted having both.

 

Stephen

 

Link to comment
  • 9 months later...

I just installed this on two of my Macs, both running Sonoma 14.6.1. Works great! This is such a boost for me. I have been calling up KM macros via a BetterTouchTool gesture. That works great and I will probably leave it in place. 

But, being able to keep my hands on my keyboard for some of my KM tasks has taken my Alfred and Keyboard Maestro usage to a new level.

Thank you so much for your work on this!!!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...