如何操纵"数据"在AppleScript的对象 [英] How to manipulate "data" objects in AppleScript

查看:194
本文介绍了如何操纵"数据"在AppleScript的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过AppleScript的iTu​​nes的工作。轨道的艺术品元素包含图像数据(或原始数据,这似乎在实践中返回相同的东西),其可以被检索,并且说,直接写入到文件中。 (这是一个如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的)。在脚本调试,它看起来像«数据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.

我真的不知道什么是guillemets在AppleScript的意思是,这或对象的性质是什么,还是这件事情可以本地询问。在这个任何引用将是有益的。谢谢!

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!

推荐答案

请参阅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对原材料codeS的解释,数据和使用guillemets的AppleScript的;看到这个答案:

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:

<一个href=\"http://stackoverflow.com/questions/16995273/getting-artwork-from-current-track-in-applescript\">Getting从AppleScript的当前曲目的作品

有关从iTunes艺术品图像数据写入到文件的一个例子。

for an example of writing image data from iTunes artwork to file.

这篇关于如何操纵&QUOT;数据&QUOT;在AppleScript的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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