iTunes的10.6.3改变AppleScript的界面? [英] iTunes 10.6.3 changes AppleScript interface?

查看:119
本文介绍了iTunes的10.6.3改变AppleScript的界面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用的RB-appscript宝石控制iTunes一个简单的Ruby脚本,而现在我已经更新到iTunes 10.6.3,这似乎被打破。

I have a simple Ruby script that uses the rb-appscript gem to control iTunes, and now that I've updated to iTunes 10.6.3, it appears to be broken.

此前10.6.3,如有望获得当前选择的音轨这块code的将工作:

Prior to 10.6.3, this piece of code would work as expected to get the currently selected track(s):

Appscript.app('iTunes').selection.get()

现在它产生以下错误:

RuntimeError: Unknown property, element or command: 'selection'

编辑:只是确认这也打破了PY-appscript,所以它不是孤立的RB-appscript

这是奇怪,因为下面的实际的AppleScript的一块仍然有效:

Which is weird, because the following piece of actual AppleScript still works:

tell application "iTunes" to get selection

类似的例子,如 Appscript.app('查找')。desktop.files.get()仍能正常工作。

我找不到可以解释,如果或者为什么这个改变,或者我可以做什么来更新我的脚本的任何信息。我猜它是与山狮的变化。

I couldn't find any information that would explain if or why this was changed or what I could do to update my script. I'm guessing it has something to do with Mountain Lion changes.

推荐答案

看起来像iTunes的10.6.3版本是与与山狮来的沙盒。下面是一篇文章谈论它(阅读注释,太)的http://www.leancrew.com/all-this/2012/06/the-first-nail-in-the-coffin-of-python-appscript/

Looks like iTunes 10.6.3 was release with the sandboxing that is coming with Mountain Lion. Here is an article talking about it (read the comments, too) http://www.leancrew.com/all-this/2012/06/the-first-nail-in-the-coffin-of-python-appscript/

可能会开始发生更多的(如果不是一切)作为山狮

Probably will start happening much more (if not with everything) as of Mountain Lion

这篇关于iTunes的10.6.3改变AppleScript的界面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆