Mac account detail window [Ventura]

Hello everyone, Up to Monterey, a script we use to make it easier for users to change the password on their local account on the computer has worked very well. But after Monterey, it no longer works. I've searched the web like crazy without finding any solution for Ventura. So I'm giving this form a shot in the hope that someone has a solution or something to help me along the way.

The main problem is to go from Users and Groups in System setting to the account detail where you can click the button for changing password. Anyone have any idea?

Code looks as follows:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use framework "AppKit"
use scripting additions

set userName to short user name of (system info)

-- Create a dialog with 3 buttons
display dialog "Mac Utility - user: " & userName buttons {"Change Password", "Forget Wi-Fi", "Cancel"} default button 1 with title "User Utilities" with icon caution

-- Open Users and Groups
if result = {button returned:"Change Password"} then
	tell application "Finder" to open file "Accounts.prefpane" of (path to system preferences)
	-- Show account details window
	
		-- This is where I'm stuck
	
	-- The rest of the script bellow
else if....

The earlier code looked as bellow that doesn't work with Ventura.

	tell application "System Events"
		tell application process "System Preferences"
			delay 1
			click button -1 of tab group 1 of window 1
		end tell
	end tell
	

Tanks in advance.

In worst case I want it to result at the following section as shown in picture bellow.

And in best case as this.

The biggest problem I think is the i-buttons.

With the Users & Grroups pane already open, this script works for me:

tell application "System Events" tell application process "System Settings" delay 1 click button 2 of group 1 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window 1 delay 1 click button 1 of group 1 of scroll area 1 of group 1 of sheet 1 of window 1 end tell end tell

Sorry the line endings didn't work. I'll let you figure them out.

Mac account detail window [Ventura]
 
 
Q