激活应用程序但保持脚本运行Applescript

时间:2015-03-27 01:28:19

标签: applet applescript

我想用Applescript打开另一个应用程序(applescript applet),但仍然转到我脚本中的下一行。

我虽然会自动执行此操作但不是出于某种原因。

这是我的代码:

...
if selectedMenu is "1" then
        set theDisplay to "⬟"
        my display(theDisplay)
        tell application "/Users/Patrick/Documents/Programming/Applescript/Applications/NoWatch.app/Contents/Resources/Both.app" to activate
        tell application "/Users/Patrick/Documents/Programming/Applescript/Applications/NoWatch.app/Contents/Resources/VNC.app" to quit saving no
        tell application "/Users/Patrick/Documents/Programming/Applescript/Applications/NoWatch.app/Contents/Resources/SSH.app" to quit saving no
...

我在激活之后包含了部分,只是因为这是造成这种情况的原因。

此外,在关闭我激活的应用程序后,脚本会像平常一样继续。

1 个答案:

答案 0 :(得分:1)

 ignoring application responses
    tell application "Finder" to activate
 end ignoring