XCode 5行为脚本生成权限错误

时间:2013-10-04 12:59:24

标签: xcode behavior

今天早上我想我会花几分钟为Prefereces>行为编写一个XCode 5脚本来隐藏面板,以便更好地关注代码和故事板。一些命令键:需要多长时间.....

我使用AppleScript,它从Applecript编辑器运行良好。然后我将其作为脚本包导出并将其挂钩到XCode中的行为。当我点击键命令时,我收到权限错误:

  

无法启动脚本/ Users / sss / Documents / pers / XCode Scripts / XCodeCodeFocus.scptd:无法完成操作。许可被拒绝

AppleScript非常基础:我尝试过:

activate application "Xcode"
tell application "System Events" to keystroke "Y" using command down
tell application "System Events" to keystroke "0" using {command down, option down}
tell application "System Events" to keystroke "1" using command down

和(如果造成破坏,则不使用activate命令)

tell application "System Events" to keystroke "Y" using command down
tell application "System Events" to keystroke "0" using {command down, option down}
tell application "System Events" to keystroke "1" using command down

文件的文件权限是:

  

drwxr-xr-x @ 3 sss staff 102 Oct 4 06:31 XCode Code Focus copy.scptd

该文件位于我的代码目录中,但我不明白为什么会影响这些内容。

这在XCode 5中是否被破坏,或者我错过了什么......

非常感谢!

0 个答案:

没有答案