Applescript iTunes字典解释

jld*_*ont 7 macos applescript itunes

我想知道以下不同配色方案的含义:

替代文字

蓝色C标签是什么意思?还有紫色的?

免责声明:绝对OSX新手在这里......请温柔;-)

Dav*_*ong 7

蓝色"C"表示"命令".你这样使用这些:

tell application "iTunes" to <command> --search, stop, update, eject, etc
Run Code Online (Sandbox Code Playgroud)

紫色C表示"类".这些表示可以从iTunes中提取的不同类型的数据,选择单个类会显示它具有的属性(橙色E).类(或类的实例,实际上)是在您请求信息后返回给您的内容,如下所示:

tell application "iTunes"
   set currentSong to the current song
end tell
Run Code Online (Sandbox Code Playgroud)

运行之后,currentSong将包含Song该类的实例,然后您可以询问该信息,例如其艺术家是谁,等等.