【发布时间】:2012-01-19 02:31:55
【问题描述】:
运行以下脚本时:
on run
tell application "Safari"
set allWins to every window
set allTabs to {}
repeat with currWin in allWins
set allTabs to allTabs & every tab of currWin
end repeat
repeat with currTab in allTabs
try
if ((characters -10 thru -1 of (title of currTab as string)) as string) = "Google Music" then set musicTab to currTab
end try
end repeat
tell musicTab
execute javascript "SJBpost(\"playPause\");"
end tell
end tell
end run
收到语法错误Expected end of line but found identifier. 和javascript 突出显示。
我正在使用 automator 并尝试按照this 文章为谷歌音乐创建热键。
【问题讨论】:
标签: safari applescript