查看完整版本 : 用BetterTouchTool將Browser播緊嘅歌放上Touch Bar

前晚幼小的廁紙 2018-9-14 09:08 PM

用BetterTouchTool將Browser播緊嘅歌放上Touch Bar

新加一個Widget,類型是“Run Apple Script and Show Return Value”, 用以下Apple Script,就可以在Widget上顯示當前播緊嘅歌名(其實是tab標題名)[code]tell application "Google Chrome"
repeat with t in tabs of windows
tell t
if URL starts with "http://music.youtube.com/" or URL starts with "https://music.youtube.com/" then
set tabtitle to title of t as string
end if
end tell
end repeat
end tell
set AppleScript's text item delimiters to "-"

return text item 1 of tabtitle[/code]script 用Chrome和Google Music做例子,改下就可以用係其它瀏覽器或者網站
頁: [1]
查看完整版本: 用BetterTouchTool將Browser播緊嘅歌放上Touch Bar