Jump to content

Help with Snippet Expansion on macOS 13


Recommended Posts

Welcome to the forun. I just want to check that ypu've also looked at this Alfred help page. Note that it says:

Quote

Snippet auto-expansion is disabled by default. To activate it, launch Alfred's preferences to Features > Snippets and check the box for "Automatically expand snippets by keyword".

Have you in fact enabled automatic expansion of snuppets?

 

Stephen

Link to comment

@rogerlee Welcome to the forum!

 

Could you please email your Diagnostics file to our info@ address so that I can take a look at your preferences? You can get the Diagnostics file by typing "?diagnostics" into Alfred.

 

This will allow me to help you further :)

Link to comment

Hi Vero,

 

I tried all these steps:

 

 

  1. https://www.alfredapp.com/help/getting-started/permissions/#regrant 
rogerlee@RogerdeMBP ~ % sudo tccutil reset All com.runningwithcrayons.Alfred
Successfully reset All approval status for com.runningwithcrayons.Alfred

and then regrant these permissions, see images.

 

2. I tried to use App cleaner & Uninstaller to remove all Alfred and reinstall it again, but still the same. The snippet is still not working.

 

 

 

2.png

3.png

4.png

Link to comment

Could you please provide more details about what's not working with snippets?


- If you launch TextEdit (a simple and native app, ideal for testing) and try to expand your snippet, what do you see? Does the keyword disappear, does the snippet content appear, do you hear an error beep?
- If your snippet expands in TextEdit, in which apps do you see a different behaviour?
- What is your snippet keyword? What is the content that should be pasted?

Link to comment
Quote

- If you launch TextEdit (a simple and native app, ideal for testing) and try to expand your snippet, what do you see? Does the keyword disappear, does the snippet content appear, do you hear an error beep?

 

Yes, I type a snippet in TextEdit and nothing happen after I typed the keyword. I tried in different apps in my mac, the situation is the same.

 

 

5.png

6.png

Link to comment

@rogerlee I know this won't help you very much but I have just set up the same snippet—following your setup—and it works perfectly for me. That suggests that it must be something to do with the setup of Alfred on your machine…which rather brings us back to permissions again.

 

Edit: You might check System Settings → Privacy & Security → Automation and check what rights Alfred has there.

 

Stephen

Edited by Stephen_C
New idea!
Link to comment
17 minutes ago, rogerlee said:

Actually, I've set up the permissions correctly and I posted the screenshots of enabling these permissions in the previous threads.

It was the Automation permissions I was really interested in and I didn't see those in your previous posts. My Automation permissions for Alfred are much more extensive:

 

SystemSettings-Automation-18-04-2023-at06_59.05@2x.thumb.png.2e48a672efd20fd59160fcfa232b5432.png

 

I think when you first use Alfred to control another app (e.g., by using a snippet) Ventura should ask you if you wish to allow Alfred to control (or something like that!) that app. (Sorry, I can’t recall the exact wording.) I'm wondering if that's what you might have missed.

 

Stephen

Link to comment

If my previous post does not help please try this:

  • Go to System Settings → Privacy & Security → Accessibility.
  • Turn off Alfred. Use your password to authorise the change and not a fingerprint.
  • If this does not help, select Alfred in the list and click the “-” button to delete the Alfred entry from the list. Then click the “+” button and select Alfred from the Applications folder to add it back to the list. Alfred should re-appear in the list, with the checkbox turned on.
  • Restart your computer.

I know you have previously deleted and re-installed Alfred as well as trying re-granting permissions. My suggestion is based on the fact that Ventura has, to date, proved exceptionally tricky with permissions and what you are experiencing does seem to be a permissions problem.

 

Stephen

Link to comment

One more idea… What happens if you remove the symbol from the snippet (so that it expands merely to ps aux)? Does it work then?

 

Edit: Another thought… Does it work if you use another snippet trigger? (I.e., change ! to z, for example.)

 

Stephen

Edited by Stephen_C
Link to comment

@rogerlee In your Accessibility preferences, there are  a lot of apps listed, which indicates you have a lot of apps on your Mac using permissions to perform actions, listening to keystrokes (e.g. for snippets) and performing actions for you. These may be causing interference.

 

Could you please create a new user account on your Mac temporarily? Activate your Powerpack and grant Alfred accessibility permissions. Set up a single snippet and see whether it expands normally in TextEdit.

 

This will then help establish whether the issue is specific to your primary user profile, or a broader issue on your Mac with configuration.

 

Let us know how you get on.

Link to comment
  • Andrew changed the title to Help with Snippet Expansion on macOS 13

Hi @Vero,

 

I did what you suggested to create a new user and activate the Powerpack, but I found those apps are still listed in the accessibility permissions. So I unchecked all the apps and only leave Alfred 5 on. But it's still not working. Typing in text editor take no effect.

Link to comment
8 minutes ago, rogerlee said:

I wonder if someone who uses Alfred 5 on Macos 13.3.1(Apple M1 Pro chip) got the same situation

I'm using Alfred 5, with macOS 13.3.1, on an M2 Pro Mac and your snippet works perfectly for me. It has to be something, somewhere, in your configuration.

 

Did you migrate your apps, files and settings from an older Mac? (The answer to that question isn't going to provide an immediate solution to your problem but may help in tracing the cause.)

 

Stephen

Link to comment
5 minutes ago, rogerlee said:

I wonder if someone who uses Alfred 5 on Macos 13.3.1(Apple M1 Pro chip) got the same situation.

 

This is my exact configuration, and it works as expected.

 

When switching to a newly created user, there shouldn't be any pre-existing items in Accessibility unless your Mac is provisioned externally (i.e. it's a corporate laptop). If this is a corporate laptop, the provisioning may be installing or configuring items which are consuming the key events before Alfred gets to see them.

 

The underlying mechanism for snippets to expand in Alfred is very simple (and working well), however, if you have installed an app which manipulates the macOS event stream in the background, this could also interfere with the keystrokes Alfred is seeing, and could prevent Alfred's expansion from working.

 

As seen in your screenshots, you have an unusually high number of apps with accessibility and automation granted, so it's very difficult to identify what could be preventing normal operation.

 

A couple of questions:

 

Is this a corporate or business Mac you're using?

When was the last time you did a fresh install of your Mac?

Link to comment
Quote

Did you migrate your apps, files and settings from an older Mac? (The answer to that question isn't going to provide an immediate solution to your problem but may help in tracing the cause.)

 

No, it's a new Mac and I never migrate my apps before.

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...