Applescript 问题:"Not Allowed Assistive Access. (-1719)"
Applescript Issue: "Not Allowed Assistive Access. (-1719)"
我编写了以下 applescript 来打开文档,同时还在我的文字处理器应用程序中隐藏了一些烦人的固定工具栏。当我直接从脚本编辑器播放时效果很好。但是当我把它变成一个应用程序,并尝试在 Alfred(不是 Alfred 2)中玩时,我得到了这个:
Open "Bicycle" is not allowed assistive access. System Events got an error: Open "Bicycle" is not allowed assistive access. (-1719)
哦,我试过比"POSIX"更多的普通路线,但结果都是一样的。另外,我是 运行 最新版本的 El Capitan。
tell application "Bean"
open POSIX file "/Users/MyDrive/Documents/Bicycle.rtf"
end tell
activate application "Bean"
delay 0.3
tell application "System Events"
tell process "Bean"
click menu item "Hide Ruler" of menu 1 of menu bar item "View" of menu bar 1
click menu item "Hide Status Bar" of menu 1 of menu bar item "View" of menu bar 1
click menu item "Hide Toolbar" of menu 1 of menu bar item "View" of menu bar 1
end tell
end tell
自
"Bicycle" is not allowed assistive access
打开允许
System Preferences
> Security & Privacy
> Privacy
> Accessibility
并选中相应的复选框。
我编写了以下 applescript 来打开文档,同时还在我的文字处理器应用程序中隐藏了一些烦人的固定工具栏。当我直接从脚本编辑器播放时效果很好。但是当我把它变成一个应用程序,并尝试在 Alfred(不是 Alfred 2)中玩时,我得到了这个:
Open "Bicycle" is not allowed assistive access. System Events got an error: Open "Bicycle" is not allowed assistive access. (-1719)
哦,我试过比"POSIX"更多的普通路线,但结果都是一样的。另外,我是 运行 最新版本的 El Capitan。
tell application "Bean"
open POSIX file "/Users/MyDrive/Documents/Bicycle.rtf"
end tell
activate application "Bean"
delay 0.3
tell application "System Events"
tell process "Bean"
click menu item "Hide Ruler" of menu 1 of menu bar item "View" of menu bar 1
click menu item "Hide Status Bar" of menu 1 of menu bar item "View" of menu bar 1
click menu item "Hide Toolbar" of menu 1 of menu bar item "View" of menu bar 1
end tell
end tell
自
"Bicycle" is not allowed assistive access
打开允许
System Preferences
> Security & Privacy
> Privacy
> Accessibility
并选中相应的复选框。