PrefsMenuItem value/text

I was able to get the menu title of Safari preferences (“Einstellungen…” on my German OS) via AppleScript

tell application "System Events" to tell process "Safari" to get title of menu item 4 of menu 1 of (menu bar item 2 of menu bar 1)

To check it use Apple’s “Script Editor” and replace “Safari” with your App´s name.

You can call is as shown in this Post.

Make sure that your App has permissions to send Apple Events e.g. as shown in add a script in the Xojo Build