tell application "iTunes"write artwork 1 to "path:to:desktop" of type("JPEG")end tell
说实话,我不知道我在做什么.谁觉得有帮助?
谢谢
解决方法 您可以将当前轨道的图稿1的原始数据写入文件:-- get the raw bytes of the artwork into a vartell application "iTunes" to tell artwork 1 of current track set srcBytes to raw data -- figure out the proper file extension if format is «class PNG » then set ext to ".png" else set ext to ".jpg" end ifend tell-- get the filename to ~/Desktop/cover.extset filename to (((path to desktop) as text) & "cover" & ext)-- write to fileset outfile to open for access file filename with write permission-- truncate the fileset eof outfile to 0-- write the image bytes to the filewrite srcBytes to outfileclose access outfile
您也可以使用http://dougscripts.com/itunes/scripts/ss.php?sp=savealbumart,但它不包含源代码.
总结以上是内存溢出为你收集整理的从Applescript中获取当前曲目的艺术作品全部内容,希望文章能够帮你解决从Applescript中获取当前曲目的艺术作品所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)