Open Preferences KM Action (issues)

The KM action "Open System Preferences" seems to have some issues in KM v11 on Sonoma. I don't recall if I used it in KM 10 at any time, so maybe the following problems go back to v10 or earlier. I just don't know.

  1. All but three of them have the wrong icon in the KM action when you open the list.
  2. A couple of them seem to have the wrong name, eg, Localization, which may now be "Language and Region". Maybe these also have the same problem... DigiHubDisks, DesktopScreenEffectsPref
  3. A few may be obsolete now. (Expose? EnergySavePref? EnergySaver? ClassKitPreferencesPane? Battery?)
  4. "General" doesn't take you to the General tab anymore. It looks like a mismatch.
  5. There are dozens of panes (mostly sub-panes, but some root panes) that should be in the list but aren't. There are way too many of these to list here.
  6. What does a Timeout mean for this action? The documentation doesn't say.
  7. What does a Failure Aborts macro mean for this action? The documentation doesn't say.

I would really like the About pane to have a means to reach it. Is there a way I can use KM to tell when the data for that pane has been fully loaded, other than just saying "Pause 3"?

Does this work on Sonoma?

Open Preference Pane.kmmacros (24 KB)

Macro screenshot

You have a list of about 30. I tried the first 10. About 7 or 8 worked. Your list isn't the same as the list in the KM Action on Sonoma. You are missing dozens, and you have a few that aren't listed in Sonoma. It would take me at least 30 minutes to come up with an exhaustive list of differences between your macro and the one in the KM action on Sonoma.

As an example, your Dictation item takes you to Wallpaper. Surely that's not right. I spotted a few other issues in the first 8 entries.

The disabled shell script will list all your preference panes. The way I came up with the text variable list was to go through all of entries generated by the shell script and delete the ones that have clearly been deprecated in various updates and no longer open the correct (or any) pane. Those remaining in that list all work on Ventura. If you go through the same process, you should be good.

Well, many of the panes that I want to see are not listed in either the KM action or the macro you gave me. Eg, the About pane, which contains critical system information plus important buttons, the same kind of things that I needed to be able to write this macro.

Is there an "About" pane in Sonoma? There isn't one in Ventura. Not a pane, anyway.

It depends how you define "pane". The About Pane is a sub-pane of the General Pane. And neither the KM action nor your macro allows me to reach either of those panes. At least the KM action has an option for "General" but it takes one to the wrong pane ("Appearance.")

I get to several panes in Ventura using the 'View' menu of System Settings:

I was aware of that when I wrote my original post, but I still wrote my post because I still thought that there was something wrong with the KM action that should be fixed.

That's a reasonable description. However, going back to your foundational premise, it has never been reachable via the KM Open System Preferences action.

I can confirm that you're right about General not going to the right pane; it takes you to Appearance. I think this may be a KM 11 thing as I'm yet to upgrade to Sonoma, but I'm guessing.

There appears not to be a General.prefPane file, so even my macro suggestion doesn't help.

However, I've discovered that you can navigate to Preferences using URLs:

Go to "About" Tab in General Preferences.kmmacros (19 KB)

Macro screenshot

1 Like

Here's an improved version of what I offered up earlier. Whether it works on Sonoma remains to be seen:

Open Preference Pane.kmmacros (23 KB)

Macro screenshot

Your "About" tab works now, on Sonoma. I tested all the others and found these didn't work:

  1. Game Controllers (which may be because I don't have one installed), and
  2. Network (which may be because I use WIFI, but I do have a working Ethernet connection), and
  3. Touch ID & Password (I don't have Touch ID), and
  4. Trackpad (I don't have one set up at this moment), and
  5. Transfer or Reset, and
  6. VPN (I don't have one.)

It might be handy if there was a way for your macro to include a check to wait until the pane has appeared, rather than leave it to the calling macro to figure that out. And if no such pane exists, it could perform an Error condition.

Sorry, you've lost me. What calling macro?

If I write a macro that calls your macro, my macro is the calling macro. I may want to use your macro in my macros so I can gather some information.

Network should work now. It was a URL typo. The others are simply not available on your system, as you pointed out.

Hopefully this does the trick:

Open Preference Pane.kmmacros (26 KB)

Macro screenshot

Network works now. Thanks. And thanks for adding the "Pause" code so that a person can use a macro to call your code without having to insert a long Pause statement afterwards. This will be helpful to me in the future.

1 Like

Can I assume this is for your OCR speed test macro? If so, you could use something like this to gather system info instead of having to open System Settings:

Shell Script

# Get system information for macOS

# Get OS version
os_version=$(sw_vers -productVersion)

# Get hardware information
hardware_info=$(sysctl -n machdep.cpu.brand_string)

# Get total RAM
total_ram=$(sysctl -n hw.memsize | awk '{print $0/1073741824 " GB"}')

# Get screen resolution and size
screen_resolution=$(system_profiler SPDisplaysDataType | grep 'Resolution' | awk '{print $2, $3, $4}')

# Combine information into a multi-line string
system_info="Hardware Info: $hardware_info
OS Version: $os_version
Total RAM: $total_ram
Screen Resolution: $screen_resolution"

# Print system information
echo "$system_info"

That indeed would have helped me. I was thinking that AppleScript probably would have access to this. In fact, I was pondering whether to ask for a KM action to fetch this data, much like the Filter action has options for filtering data.

I know a lot of shell commands, but I've never even heard of "sysctl" before. I definitely will be reading up on that one now.

1 Like