Jump to content

AppleScript string comparision never evaluate true in Alfred


Recommended Posts

I am writing a script for an Alfred workflow. However, the string comparison never evaluates true. 

 

The "{query}" inside the script does get replaced with a correct ctext value type which I can obverse using display dialog "{query}" and display dialog class of "{query}".

 



if "{query}" is equal to "a" then
say "in the a case"
else
say "in the else case"
end if


 

I have also tried use if "{query}" = "a" then but still have the same outcome.

 

The evaluation keeps falling to the else statement.

 

I am referring the article below when writing the conditional statements.

 


 

8Dl8Z.png

Edited by li-xinyang
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...