您好,我正在使用这个自动化的苹果脚本自动启动和播放全屏视频使用快速时间。
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外部启动自动化应用程序时,我收到了这条消息。
操作"Run AppleScript“遇到错误”无权向QuickTime Player发送Apple事件“
我的自动化工作流程如下所示
我已经允许访问安全隐私>访问以下应用程序:终端,领事,AEServer,自动化,领事和Quicktime播放器。
我已经允许访问安全Privacy>Full磁盘访问上面列出的相同程序。
我已允许以下内容访问安全隐私>自动化: Automator>QuickTime Player和Terminal>Finder
我不知所措,请帮忙。
发布于 2020-08-30 14:40:35
该错误与可访问性和完全磁盘访问无关
您必须在脚本应用程序的Info.plist中添加密钥NSAppleEventsUsageDescription。
使用Right-click > Show Package Contents在查找器中打开应用程序包,然后使用文本编辑器在Contents中打开Info.plist文件并插入
<key>NSAppleEventsUsageDescription</key>
<string>Jarvis needs to control QuickTime Player</string>键值对的位置是无关紧要的,但它不能紧跟在key行之后。
https://stackoverflow.com/questions/63640344
复制相似问题