问题描述
我正在通过 AppleScript 使用 iTunes.轨道的 artwork
元素包含图像 data
(或 raw data
,在实践中出现返回相同的东西),可以检索并且,比如说,直接写入文件.(这是一个例如 PNG 字节流.)
I'm working with iTunes via AppleScript. The artwork
element of a track contains image data
(or raw data
, which appears in practice to return the same thing), which can be retrieved and, say, directly written to a file. (It's an e.g. PNG bytestream.)
但是我不知道除了将它写入文件之外如何处理这个东西.我想问它包含多少字节,或者甚至翻遍它(尽管后者很可能超出 AppleScript 的范围).在 Script Debugger 中,它看起来像 «data tdtaXXXXXX.....»
(我编写 XXX 的十六进制值),并且 iTunes 脚本字典没有链接到任何有用的类型/类.
But I don't know how to do anything with this thing besides write it to a file. I'd like to ask it how many bytes it contains, or even rummage through it (though the latter may well be out of scope for AppleScript). In Script Debugger, it looks like «data tdtaXXXXXX.....»
(hex values where I wrote the XXXs), and the iTunes scripting dictionary doesn't link through to any useful type/class for it.
我不太确定 AppleScript 中的 guillemets 是什么意思,或者这个对象的性质是什么,或者这个东西是否可以被本地询问.任何有关这方面的参考资料都会有所帮助.谢谢!
I'm not really sure what the guillemets mean in AppleScript, or what the nature of this object is, or whether this thing can be interrogated natively. Any references on this would be helpful. Thanks!
推荐答案
See https://books.google.com/books?id=rW5k0w_wC3MC&pg=PA57&lpg=PA57&dq=guillemets+applescript+events+data&source=bl&ots=ogzi9W4jxW&sig=7ct-n0wpzdhBhtHDJtTrZDKgEEk&hl=en&sa=X&ei=-qSYVICZAsjooASo0oKwCg&ved=0CB4Q6AEwAA#v=onepage&q=guillemets%20applescript%20events%20data&f=false for explanation of raw codes and data and use of guillemets in AppleScript; See this answer:
将图像数据从 iTunes 艺术作品写入文件的示例.
for an example of writing image data from iTunes artwork to file.
这篇关于如何操作“数据"AppleScript 中的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!