我有一个AppleScript可以在iTunes中获取当前的专辑名称,并设置为剪贴板。我如何打开网址,例如谷歌专辑名称?
tell application "iTunes"
set track_album to the album of the current track
set the clipboard to track_album
end tell
答案 0 :(得分:2)
简单:tell application "Safari" to search the web for track_album
这将使用Safari的默认搜索引擎进行搜索。如果您想在特定网站上进行自定义搜索,例如Last.fm,您可以撰写如下搜索查询:
set query to "http://www.last.fm/search?q=" & track_album & "&type=album"
tell application "Safari" to open location query