【发布时间】:2015-01-28 03:24:01
【问题描述】:
我在 Automator 中编写了一个 AppleScript/Shell 脚本应用程序来终止所有相关进程,重置环境测试变量,并删除所有相关 plist、设备文件和日志。但是,我仍然需要手动删除应用程序 oAuth 令牌,然后才能再次开始测试。我需要一种解决方案来自动查找与属性匹配的所有密码并将其删除。
从另一个问题我发现了以下sn-p:
property theKey : "abcd"
tell application "Keychain Scripting"
set keyList to every generic key of current keychain
repeat with x from 1 to (length of keyList)
if the name of item x of keyList is theKey then
delete generic key x of current keychain
exit repeat
end if
end repeat
end tell
但是,当我尝试验证它时,它会挂在“通用”上。
想法?
【问题讨论】:
标签: applescript keychain