我正在制作一个需要root权限的应用程序。我是新来的applscript和道歉,如果这是一个愚蠢的问题,但我想要做的是检查密码是否正确。我得到一个提示密码字符串是这样的:Applescript检查密码是否正确
set thePass to the text returned of (display dialog "I need you to enter your password" default answer "" buttons {"Okay"} default button 1 with icon file ((path to resource "Icon.icns") as text) with hidden answer)
我需要检查是否thePass
实际上是在继续之前他们的密码。我不想仅使用默认密码提示。有没有办法做到这一点?
我已经尝试了一下,在错误语句中测试密码时,如果输入的密码不正确,它只会提示输入密码。