如何获取 iTunes 选择的文件路径 [英] How do I get the file path of an iTunes Selection
本文介绍了如何获取 iTunes 选择的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 AppleScript 确定在 iTunes 中选择的曲目路径.它似乎不是 track
类的属性.谁能告诉我如何获取文件路径?
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屋!
查看全文