How to Execute the Shortcuts for Mac in macOS Monterey

Another way to control homekit or get homekit status is to enable "Type to Siri" in the system preferences and use KM to type requests to Siri and then to get the results back using OCR.

It's not a very good way to get the answer. In fact it's a rather painful way, unless you are happy with an audio answer, but it is another way.

I have to agree there

I used the HomeBot for Shortcuts app that adds functions on Mac to Shortcuts. Developer was very responsive to a question I had - price was reasonable and it works very well. It was the native Shortcuts parts that didn’t work well - UI got confused, values not returned per docs, etc.

I used Shortcuts starting when the first Monterey Beta came out, probably about 6 months ago. It was horrible then. I'm sure it's much better now. For example, back then there was no documentation. I had to figure things out myself. I suspect that there is documentation now. I should try it again. I have about 50 shortcuts now that I debugged months ago, so I haven't really used it much since the official release. I suspect it's a lot less buggy now that it was months ago.

Shortcuts on Mac is still barely a beta version, regardless if Apple has called it that or not.

I think Apple have done a huge disservice to the Shortcuts team by releasing the Mac app in this state. I fear people will try it, see how buggy it is, and never come back.

I just hope we don't have to wait for Snow Monterey for it to work properly, and that it gets rapidly updated now that Monterey is out.

At first I thought you meant it was still officially a beta, but (after reading the new help file, which didn't exist in beta) it seems that what you mean is that it's "barely a beta" in your opinion. What exactly would Apple have to do get it out of your "barely beta" status? Is it just bug fixes, or changes?

It would have to work more reliably and not have dozens of weird interface bugs.

Honestly, I can't say more specifically because I've given up trying to make it work until I hear from people that it has gotten better.

1 Like

I only succeeded in launching Shortcuts.app shortcuts when using Shell Scripts instead of Apple Script. And it works with HomeKit too! (which is the only reason why I would bother diving into the app)

Note: it seems to operate solely when the shortcuts stored in Shortcuts.app are named with alphabetical letters, no spaces, no simbols.

Here's the script:
shortcuts run nameofshortcut

Source: Run shortcuts from the Mac command line – Six Colors

1 Like

All of the shortcuts that I call from KM have alphabetic OR numeric characters. If you wanted to use spaces (or other characters) you could just place double quotes around the shortcut name when you call it.

Thanks, I was indeed suspecting something was wrong with my syntax, but didn't spend much time tinkering with it. Appreciate the help

Note: single quotes work, double quotes do not

Double quotes work for me. I'm guessing that you are using them in some different way than I am.

I use double quotes that way, and they are fine.

My guess is that your macOS has "Smart Quotes" turned on. That would explain your problem. Notice how mine are turned off. I'm guessing yours are turned on.

2 Likes

That explains it! Thanks

You're welcome. What was happening was macOS was modifying your double quote keys in all sorts of places. This is particularly damaging for people who program, not only with KM.

This should be the first thing you fix after a fresh install of macOS on every new computer you get.

As you can tell I am not much of a programmer, but KM is steering my way down that path every day. So tips like that make a difference

You overestimate my ability to remember anything about anyone. I treat every single post from everyone as a post from someone I've never met, because the truth is I can't remember names and their posts.

I have a memory like a goldfish.

I thought that my ignorance about smart quotes would be enough to give me away :joy: did not mean to assume anything

Everyone who programs has to go through this very problem with smart quotes.

Hmm, there's a useless key on the keyboard called CAPS LOCK. Maybe someone could write a macro in KM that toggles the Smart Quotes attribute and assign it to that key.

Solved with Keyboard Maestro 10.1. Thanks @peternlewis!

3 Likes