automating-password-v2.txt 524 B

12345678910111213141516
  1. -- Taken from a comment by Mr. X on http://selfsuperinit.com/2014/01/20/exporting-icloud-keychain-passwords-as-a-plain-text-file/
  2. set keychainPassword to "secret"
  3. tell application "System Events"
  4. repeat while exists (processes where name is "SecurityAgent")
  5. tell process "SecurityAgent"
  6. try -- added
  7. set value of text field 1 of window 1 to keychainPassword
  8. click button "OK" of window 1
  9. on error -- added
  10. -- do nothing and skip -- added
  11. end try -- added
  12. end tell
  13. delay 0.2
  14. end repeat
  15. end tell