我正在为Alfred工作流程编写脚本。但是,字符串比较永远不会评估为真。
脚本内部"{query}"确实被替换为正确的ctext值类型,我可以使用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
我也尝试过使用if "{query}" = "a" then但仍然有相同的结果。
评价不断落到else说法上。
我在编写条件语句时指的是下面的文章。
http://computers.tutsplus.com/tutorials/if-and-if-else-applescript-conditional-statements--mac-45590
