Is it possible to run an applescript ONLY if a specific input is inserted If I put in my attempts at the code i might be clearer at what Im getting at
set x to display dialog "What is your password?" default answer "" with hidden answer
set y to (text returned of x)
display dialog (text returned of x)
display dialog y
if (text returned of y) is 3232 then
display dialog "Hi" buttons ["OK"]
end if
All the in-between stuff is just testing and making sure everything is working properly
Best Answer
First, you're trying to check against
text returned of y
, wherey
istext returned of x
– a string, not a dialog result sotext returned of y
won't work. Just usey
.Second, you need to be testing your string stored in
y
against another string, not a number. Wrap3232
in quotes: