Tra*_*ics 37 automator macos-mojave
在我更新到Mojave后,我再也无法使用我之前使用过的自动机服务了.

你看到我的代码有什么问题,或者这是最新macOS的问题?
脚本
on run {input, parameters}
set pathList to {}
repeat with itemNum from 1 to count of input
tell application "System Events"
copy POSIX path of (container of (item itemNum of input)) to end of pathList
end tell
end repeat
return pathList
end run
Run Code Online (Sandbox Code Playgroud)
Joe*_*Joe 30
这绝对是Mojave新安全框架的一部分.在terminal尝试
osascript -e 'tell application "Finder"' -e 'set _b to bounds of window of desktop' -e 'end tell'
Run Code Online (Sandbox Code Playgroud)
你可能会收到:
36:42: execution error: Not authorized to send Apple events to Finder. (-1743)
Run Code Online (Sandbox Code Playgroud)
在第一次执行时应该发生的事情是Finder打开一个对话框,通知您terminal正在请求向Finder发送事件的权限.如果您允许,那么terminal将添加到Automation页面中System Preferences > Security & Privacy > Automation:
我目前看到两个问题:
其他人已经写了更多关于此的信息:
希望这能在Mojave发布之前解决,因为它会严重影响macOS的自动化功能.
Abd*_*lah 19
我也面临着同样的错误gitk。
启动脚本中的错误:执行错误:未经授权将Apple事件发送到系统事件。(-1743)
转到Settings -> Security & Privacy -> Privacy -> Automation -> Privacy tab并选中System Events复选框。
Dan*_* S. 10
我在运行AppleScript .app应用程序时遇到了类似的错误.我收到以下错误:
Not authorized to send Apple events to Finder. (-1743)
Run Code Online (Sandbox Code Playgroud)
解决方法是从源代码.scpt或.applescript源代码重新导出应用程序.这会生成一个新的.app应用程序,在我的案例中成功运行.首次启动需要批准(以及一些后续启动),并将该应用程序添加为条目Settings -> Security & Privacy -> Privacy -> Automation.
小智 8
以下是我所做的,为我解决了这个问题.我转到系统偏好设置>安全和隐私>辅助功能(左侧选项)>(输入系统密码)>单击Automator(或您要启用的应用程序)和TADA它可以工作.
我已使用以下步骤解决了相同的问题。打开Plist并在其中添加以下键
<key>NSAppleEventsUsageDescription</key>
<string>Please give access to Export details to Outlook</string>
Run Code Online (Sandbox Code Playgroud)
当您的应用程序第一次开始执行脚本时,将弹出确认消息,允许或禁止。如果单击允许,它将执行脚本。
小智 6
像这样从终端重置为我修复了它:
tccutil 重置 AppleEvents;tccutil 重置 SystemPolicyAllFiles
更新:更新到最新的公共测试版(截至2018年8月4日)为我解决了这个问题.在此之前,问题确实存在于莫哈韦的所有公共贝塔中.
原始回复:
只是想让你知道我和其他朋友都遇到了这个完全相同的问题,使用Applescript的不同Automator工作流程(与你的不同).手动激活(Finder - >服务 - > 单击项目)和键盘快捷键激活都会出现问题.
更奇怪的是,在Automator内部进行测试时,工作流程表现非常出色.
我已经通过反馈助理提交了一份错误报告,并建议其他任何看到这一点的人也会这样做!吱吱作响的轮子和所有......
Automator - 权限错误."操作"运行AppleScript"遇到错误:"未授权将Apple事件发送到系统事件.""
| 归档时间: |
|
| 查看次数: |
33567 次 |
| 最近记录: |