Need help with script to click the change password button of Accounts.

I am trying to write a script to help people change there password. For some reason it is not clicking the change password button. Any ideas??

tell application "System Preferences"
	reveal anchor "passwordPref" of pane "Accounts"
	activate
end tell



tell application "System Events"
	tell process "System Preferences"
		application "System Preferences"
		click button "Change Password..." of window "Accounts"
	end tell
end tell

Hi;

Couple of changes - you were almost there:


tell application "System Preferences"
	reveal anchor "passwordPref" of pane "Accounts"
	activate
end tell
tell application "System Events" to tell process "System Preferences" to click button "Change Password." of tab group 1 of window "Accounts"
  1. the button is part of tab group 1

  2. the text following “Change Password” is not three periods, it’s option-semicolon (called an ellipsis).

Then the sheet that pops down is sheet 1, text field 1, 2, & 3, and again the button “Change Password.” with an ellipsis.