I am making an app that requires root privileges. I am new to applscript and apologize if this is a dumb question but what I am trying to do is check whether a password is correct. I get the password string from a prompt like this:
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)
I need to check whether thePass
is actually their password before proceeding. I do not want to just use the default password prompt. Is there a way to do this?
I already tried a try, on error statement to test the password, it just prompts for the password with the default prompt if the one entered is incorrect.