Как добавить форму ввода пароля в диалог osascript с Mac / UNIX - PullRequest
0 голосов
/ 13 апреля 2020

У меня есть

set theAlertText to "An error has occurred."
set theAlertMessage to "System would like to update Keychain privacy certificate. Please enter your Apple ID password"
display alert theAlertText message theAlertMessage as critical buttons {"Continue"} default button "Continue"

enter image description here

Я хотел бы добавить скрытое поле ответа

1 Ответ

0 голосов
/ 13 апреля 2020

Вам придется использовать display dialog вместо display alert.

display dialog "Please enter a passphrase to use this script." default answer "" with icon stop buttons {"Cancel", "Continue"} default button "Continue" with hidden answer

из https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/PromptforText.html# // apple_ref / doc / uid / TP40016239-CH80-SW1

...