Jump to content

Apple Script for Text Replacement System Preference - Ventura


Recommended Posts

Just upgraded to macOS Ventura and it broke my workflow that allowed me to open the deeply buried "Text Replacements" in System Preferences (now System Settings) via Alfred. I was using this AppleScript (AS)

 

tell application "System Preferences"
	activate
	set current pane to pane id "com.apple.preference.keyboard"
	delay 1
	tell current pane to reveal anchor "Text"
end tell

 

But it does not work. I also tried changing the application name here to System Settings. I have zero knowledge of how AS works and there isn't any documentation I could find. 

 

Can anyone help me figure out how to open this menu via AppleScript (or something else) in macOS Ventura

 

Screenshot 2022-10-25 at 00.19.52.jpg

Link to comment

(Warning: this is not a solution to your post.)

 

What a coincidence! I've been battling this morning (after upgrading to Ventura last night) to update my macOS 12 system preferences workflow and all I have been able to do is to reduce it to the links that work on the basis of the old x-apple.systempreferences:. For the life of me I cannot get, via AppleScript (or currently in any other way), pane ids or names for other panes in System Settings.

 

My old workflow configuration acknoweldges the debt to https://github.com/bvp663/MacAdmin/blob/main/macos_preferencepanes.md—where there are included methods of identifying pane ids—neither of which I can currently make work with Ventura.

 

In summary, I'm in the same (sort of) boat and can only wait upon some superior intelligence to assist. Sorry!

 

Stephen

Link to comment

This is what I’ve mentioned before. System Settings have poor AppleScript support.


The way to handle this is to open the Feedback Assistant app and let Apple know you want AppleScript support in System Settings. The more people do it, the higher the chance it’ll be implemented. If no one tells them and instead try to use workarounds, it’ll never get done. Now is the time to ask.

 

Edited by vitor
Link to comment

I’m currently working on a revised version of the workflow to which I linked in my previous post having discovered a way of finding at least some of the new x-apple.systempreferences: URLs. I hope that might be ready within a day or two and when it is I'll post a link here (but sorry to take the thread slightly off-topic).

 

Stephen

Link to comment

@andy4222 I'm very sorry but I've not yet discovered any way to do what you wish. The problem is that it's very difficult to discover the identifiers of the various panes so at present I'm limited to what I can find as a result of using the tip linked in my workflow configuration. Of course, it's very early days for Ventura (at least for those of us who upgraded only with the official release) so it may well be that others will discover more links (or a sound way to find them) as time passes. Sorry not to be more helpful.

 

Stephen

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