whiteboard speaker Posted September 25, 2015 Share Posted September 25, 2015 (edited) 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. http://computers.tutsplus.com/tutorials/if-and-if-else-applescript-conditional-statements--mac-45590 Edited September 25, 2015 by li-xinyang Link to comment
deanishe Posted September 25, 2015 Share Posted September 25, 2015 I copy-pasted your code into an Alfred workflow and ran it. Works perfectly for me. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now