如何使用多重表达式反转applescript中的条件

时间:2016-11-30 18:43:39

标签: applescript

我有以下脚本正常工作:

if {title is equal to "missing value" or title starts with "Your stream on"} then
  return ""
else
  try
    return "♫  " & title
  on error err
  end try
end if

我想把这个条件转换成这样的东西:

if {title is not equal to "missing value" or not title starts with "Your stream on"} then
  try
    return "♫  " & title
  on error err
  end try
end if

2 个答案:

答案 0 :(得分:1)

实际上正确的逻辑反转

a OR b

not a AND not b

没有括号和AppleScript说真正的英语

if title is not missing value and title does not start with "Your stream on" then

答案 1 :(得分:0)

愚蠢的错误。我的语法不正确。以下作品:

if {title is missing value or not title starts with "Your stream on"} then
  try
    return "♫  " & title
  on error err
  end try
end if