[軟體] touch bar kkbox 歌曲資訊 btt

看板MAC作者 (erikkk)時間7年前 (2018/02/10 19:07), 7年前編輯推噓4(404)
留言8則, 4人參與, 7年前最新討論串1/1
無聊寫了一下 AppleScript 雖然 KKBOX 不支援 AppleScript 但是可以用 notification 硬搞出來 on isRunning(theAppName) tell application "System Events" to (name of processes) contains theAppName end isRunning if isRunning("KKBOX") then set theContentNames to {} tell application "System Events" tell process "NotificationCenter" repeat with theWindow in windows set theContents to entire contents of theWindow repeat with theContent in theContents if class of theContent is static text then set end of theContentNames to name of theContent end if end repeat end repeat end tell end tell if length of theContentNames >= 3 then if item 2 of theContentNames is equal to missing value then set theResult to (item 1 of theContentNames) & (item 3 of theContentNames) do shell script "echo \"" & theResult & "\" > ~/btt_kkbox" end if else set theResult to do shell script "cat ~/btt_kkbox" end if return theResult else return "KKBOX" end if https://raw.githubusercontent.com/erikkkerikkk/btt/master/README.md -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 69.181.64.182 ※ 文章網址: https://www.ptt.cc/bbs/MAC/M.1518260865.A.F97.html ※ 編輯: erikkk (69.181.64.182), 02/10/2018 19:08:39

02/10 19:11, 7年前 , 1F
請問大大把kkbox改成itunes也可以用嗎?
02/10 19:11, 1F

02/10 19:33, 7年前 , 2F
應該也是可以 我不確定 但itunes應該不用這麼複雜的方法
02/10 19:33, 2F

02/10 19:34, 7年前 , 3F
set track_name to the name of the current track
02/10 19:34, 3F

02/10 19:35, 7年前 , 4F
02/10 19:35, 4F

02/10 23:59, 7年前 , 5F
感謝大大
02/10 23:59, 5F

02/12 10:51, 7年前 , 6F
請問大大 這個要怎麼用? 謝謝!
02/12 10:51, 6F

02/12 10:57, 7年前 , 7F
https://imgur.com/a/Rs845 我出現這個訊息
02/12 10:57, 7F

02/22 20:07, 7年前 , 8F
touch /<path>/btt_kkbox
02/22 20:07, 8F
文章代碼(AID): #1QVjA1-N (MAC)