macos OS X 上的 iTunes API 文档在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/664949/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is documentation for the iTunes API on OS X?
提问by Bill
I'm trying to find an API to control iTunes on OS X. I found the following:
我正在尝试找到一个 API 来控制 OS X 上的 iTunes。我发现了以下内容:
http://developer.apple.com/sdk/itunescomsdk.html
http://developer.apple.com/sdk/itunescomsdk.html
I imagine on OS X, what I need is built in, but I have no idea where the API is documented?
我想在 OS X 上,我需要的是内置的,但我不知道 API 在哪里记录?
Thanks in advance for any help.
在此先感谢您的帮助。
采纳答案by Uri
AFAIK, There is only an SDK (via COM) for Windows.
AFAIK,Windows 只有一个 SDK(通过 COM)。
In Mac OS, iTunes is controlled via AppleScript.
在 Mac OS 中,iTunes 是通过 AppleScript 控制的。
There are quite a few tutorials running around, but I'm not familiar with anything official. In fact, last time I looked, they gave links to third-parties.
有很多教程在运行,但我对任何官方都不熟悉。事实上,我上次看的时候,他们给了第三方链接。
e.g., Tutorial
例如,教程
回答by cobbal
If you are using Cocoa then I would recommend the (non-apple) framework EyeTunes.
如果您使用 Cocoa,那么我会推荐(非苹果)框架EyeTunes。
Applescript may be your best bet though, either through calling a script directly or the ScriptingBridge framework available for Ruby, Python, and Objective C.
Applescript 可能是您最好的选择,无论是通过直接调用脚本,还是通过Ruby、Python和Objective C可用的 ScriptingBridge 框架。
For the documentation, look at iTunes script dictionary (drag the iTunes icon onto the Script Editor icon).
有关文档,请查看 iTunes 脚本字典(将 iTunes 图标拖到脚本编辑器图标上)。
回答by Daniel
If you are looking for the API spec for the OSX applescript interface then run the AppleScript Editor (comes with OSX) and select File->Open Dictionary and choose iTunes from the list.
如果您正在寻找 OSX applescript 接口的 API 规范,请运行 AppleScript Editor(OSX 附带)并选择 File->Open Dictionary 并从列表中选择 iTunes。
回答by mb21
There is also Karelia's iMedia Browser. Sourceavailable under a BSD-style license.
还有卡累利阿的 iMedia 浏览器。源代码在 BSD 风格的许可下可用。