Setting password of a keychain key
Setting password of a keychain key
- Subject: Setting password of a keychain key
- From: Stephen Jonke <email@hidden>
- Date: Tue, 28 Mar 2006 08:02:46 -0500
I am having trouble scripting Keychain Scripting. The following works
fine:
tell application "Keychain Scripting"
tell keychain 1
unlock
set theKey to (first key whose name is "Some Key")
set password of (first key of keychain 1 whose name is "HST
VPN") to "SomePassword"
end tell
end tell
However, the following does not work:
tell application "Keychain Scripting"
tell keychain 1
unlock
set theKey to (first key whose name is "Some Key")
set thePassword to text returned of (display dialog "Enter new
password" default answer "" with hidden answer)
set password of (first key of keychain 1 whose name is "HST
VPN") to (thePassword as string)
end tell
end tell
It gives an error at the "set password" line. I've tried casting the
entered password to "Unicode text", to "International text" and to
"string", as well as not casting. Nothing seems to work. Has anyone
gotten this type of thing to work?
Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden