我正在製作一個需要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
實際上是在繼續之前他們的密碼。我不想僅使用默認密碼提示。有沒有辦法做到這一點?
我已經嘗試了一下,在錯誤語句中測試密碼時,如果輸入的密碼不正確,它只會提示輸入密碼。