首页 > 解决方案 > 无法使用 applescript 从钥匙串中读取“帐户名称”

问题描述

无法使用苹果脚本从钥匙串中读取“帐户名称”。

这不起作用:

tell app "Keychain Scripting" to get account of "app name"

我可以使用以下命令从钥匙串中读取密码:

local password
set password to do shell script ("security 2>&1 >/dev/null find-generic-password -gl " & quoted form of "app name" & " | cut -c 11-99 | sed 's/\"//g'")

是否有关于哪些命令用于钥匙串脚本的文档?

标签: applescript

解决方案


推荐阅读