我是苹果脚本的新手,我有一个简单的苹果脚本,它在下面 -
display dialog "Enter Your User Name:" default answer ""
set theUser to the text returned of the result
现在,如果用户没有输入任何内容并单击,OK
我会进行类似的检查
if theUser = "" then
display dialog "User name is mandatory" buttons {"OK"} with title "Missing parameter" with icon "stop"
set theError to button returned of the result
if theError is "OK" then quit
end if
但是Resource wasn't found.
当检查条件时它会给我一个错误弹出窗口if
。我有尝试theUser is in {"",value missing}
等,theUser is missing value
但这些也不起作用。这里有什么问题?