applescript Making Applescript If and Else Statements Dialogue returned text


Example

display dialog "Password" default answer ""
set w to text returned of the result
if w = "Password" then
    display notification "Correct"
end if