iTunes 10.6.3 更改 AppleScript 界面?

编程入门 行业动态 更新时间:2024-10-20 09:34:17
本文介绍了iTunes 10.6.3 更改 AppleScript 界面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个简单的 Ruby 脚本,它使用 rb-appscript gem 来控制 iTunes,现在我已经更新到 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 之前,这段代码将按预期工作以获取当前选择的曲目:

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('Finder').desktop.files.get() 仍然有效.

Similar examples such as Appscript.app('Finder').desktop.files.get() still work.

我找不到任何信息来解释是否或为什么更改了此项,或者我可以做些什么来更新我的脚本.我猜这与 Mountain Lion 的变化有关.

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 与 Mountain Lion 附带的沙盒一起发布.这是一篇谈论它的文章(也请阅读评论)http://www.leancrew/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/all-this/2012/06/the-first-nail-in-the-coffin-of-python-appscript/

从 Mountain Lion 开始,可能会发生更多(如果不是全部)

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

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

更多推荐

[db:关键词]

本文发布于:2023-04-17 14:50:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/915873.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:界面   iTunes   AppleScript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!