我如何获得iTunes的选择的文件路径 [英] How do I get the file path of an iTunes Selection

查看:160
本文介绍了我如何获得iTunes的选择的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图确定的轨道在使用AppleScript的iTu​​nes选择的路径。它似乎并没有成为跟踪类的属性。谁能告诉我怎样才能得到的文件路径?

I'm trying to determine the path of track selected in iTunes using AppleScript. It doesn't seem to be a property of the track class. Can anyone tell me how I can get the file path?

推荐答案

试试这个:

--gets file path of selected song
tell application "iTunes"
 set songLocation to get location of selection
end tell
return songLocation

--gets file path of currently playing song
tell application "iTunes"
 set songLocation to get location of current track
end tell
return songLocation

这篇关于我如何获得iTunes的选择的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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