Applescript 运行Apple脚本时自动化失败

Applescript 运行Apple脚本时自动化失败,applescript,action,automator,quicktime,appleevents,Applescript,Action,Automator,Quicktime,Appleevents,您好,我在Automator中使用这个Apple脚本,使用quick time自动启动并在全屏视频中播放 tell application "QuickTime Player" set theMovie to open file "Users:ronaldwise:Movies:Jarvis Startup.mp4" tell theMovie set the presenting to true set t

您好,我在Automator中使用这个Apple脚本,使用quick time自动启动并在全屏视频中播放

tell application "QuickTime Player"
    set theMovie to open file "Users:ronaldwise:Movies:Jarvis Startup.mp4"
    tell theMovie
        set the presenting to true
        set the looping to false
        play
    end tell
end tell
当我在automator中按play时,脚本运行正常。但是,当我尝试在automator之外启动自动化应用程序时,我收到此消息

“运行AppleScript”操作遇到错误“未授权将Apple事件发送到QuickTime Player”

我的自动化工作流程如下所示

我已允许访问以下应用程序的安全隐私>可访问性:终端、领事、AEServer、Automator、领事和Quicktime player

我已允许访问上述相同程序的安全隐私>完整磁盘访问

我已允许访问以下内容的安全隐私>自动化:Automator>QuickTime Player和终端>Finder


我不知道是否需要任何帮助。

该错误与可访问性和完整磁盘访问无关

您必须在脚本应用程序的Info.plist中添加密钥

使用
右键单击>显示包内容
在Finder中打开应用程序包,然后使用文本编辑器在
内容
中打开
Info.plist
文件并插入

<key>NSAppleEventsUsageDescription</key>
<string>Jarvis needs to control QuickTime Player</string>
nsappleeventsagedescription
贾维斯需要控制QuickTime播放器

键值对的位置是不相关的,但它不能直接跟随
键值
行。

您运行的是什么版本的macOS?暂且不考虑操作系统版本,如果您将工作流保存为应用程序,则可能是该应用程序需要特殊访问(可能不是列出的所有应用程序)。我也授予了应用程序权限。可访问性和磁盘访问权限。我正在运行ios11.0,但您是如何做到的。我一直在想如何让它工作几个小时。我对这类事情不熟悉,也从未编写过任何类型的自动化程序或代码。老实说,我很惊讶我想到了这一点这么多。这个过程是什么样子的?所以我添加了建议的密钥,提示我允许访问。现在在安全和隐私中,QuickTime player列在终端下面。但是当应用程序在登录时启动时,我仍然收到相同的错误。“运行AppleScript”操作遇到错误:“未授权将Apple事件发送到QuickTime Player”