我需要编写以下内联脚本
tell app "Spotify Queue"
addTrack "spotify:track:7sa1xOgT1c8xQfbSL5FrCe"
end tell
像这样一个
sh('osascript -e \'tell app "Spotify" to playpause\'')
但我无法做到。
答案 0 :(得分:1)
您不需要多行:
tell app "Spotify Queue" to addTrack "spotify:track:7sa1xOgT1c8xQfbSL5FrCe"
如果确实需要多行,可以像这样使用osascript:
osascript -e 'tell app "Finder"' -e 'display dialog "Multi-line"' -e 'end'