【发布时间】:2013-03-12 15:36:17
【问题描述】:
目前我有这个工作代码:
on run
set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set albumName to (get album of current track)
end if
end tell
end if
return text 1 thru 10 of albumName
end run
如果运行 iTunes 并且现场专辑的格式正确 (YYYY-MM-DD) - 这将恢复现场专辑的日期。我现在想获取“返回文本 1 到 10 of albumName”的结果并将其添加到此代码中:
tell application "Firefox" to activate
tell application "Firefox"
open location "http://someband.com/showID=" & *[insert code for "text 1 thr 10 of albumName" variable]*
end tell
我知道“&”不正确,但我认为这是开始。这应该起作用的方式是,如果我正在收听“2013-03-12 Live on StackOverflow”,我希望脚本采用“2013-03-12”并将其附加到我的链接,以便 Firefox 打开网站地址:“@987654321 @"
...有意义吗?任何帮助将不胜感激。谢谢!
【问题讨论】:
标签: applescript itunes