Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell AppleScript:继续,不管有什么错误_Shell_Applescript - Fatal编程技术网

Shell AppleScript:继续,不管有什么错误

Shell AppleScript:继续,不管有什么错误,shell,applescript,Shell,Applescript,我有一个以下语法的AppleScript: do shell script "something" do shell script "something 2" do shell script "something 3" 让我们说“某物2”给了我们一个错误,并且没有被正确地执行。我该如何让AppleScript继续执行“某物3”,而不管“某物2”的结果是什么 希望你能理解 谢谢大家! 只需放置一个试一下块 do shell script "something" try do shell

我有一个以下语法的AppleScript:

do shell script "something"
do shell script "something 2"
do shell script "something 3"
让我们说“某物2”给了我们一个错误,并且没有被正确地执行。我该如何让AppleScript继续执行“某物3”,而不管“某物2”的结果是什么

希望你能理解


谢谢大家!

只需放置一个
试一下

do shell script "something"
try
    do shell script "something 2"
end try
do shell script "something 3"