【发布时间】:2017-05-23 12:53:40
【问题描述】:
我认为只需使用“or”运算符就可以检查变量“theMessage”是否包含“x”或“y”。显然不是。
我试过了:
else if theMessage contains {"display", "screen"} then
--sleep computer's display
do shell script "pm displaysleepnow"
set theResponse to "Now sleeping the computer's display"
我可能会写很多这样的东西,所以如果我能用运算符在 terms 中为 term 编写一个子例程,那就太好了...例如
if theMessage contains {....} not {....}
【问题讨论】:
标签: list applescript contains