MorbidEntree
New Member
Is there a way yet to display what the current song is that is playing in Spotify, iTunes, etc.?
This script works really well, thanks a lot for posting it.i threw together this apple script to grab the itunes now-playing info and write it to a text file every 5 seconds... kind of a hack but it works
https://github.com/dzomb/tuneout
It'll ask you to select a text file, but the first time you run it, just type in a name that doesn't already exist, and just use that same file every time. You can then add that text file to OBS and, when iTunes (or any other Music player - just change where it says "iTunes" to the name of the player, like "Spotify") is playing music the file will have the text in it. Also make sure iTunes is running.
tell application "System Events"
set num to count (every process whose name is "Spotify")
end tell
if num > 0 then
tell application "Spotify"
set playState to (player state as text)
if playState is equal to "playing" then
set trackName to name of current track
set artistName to artist of current track
set albumName to album of current track
set trackInfo to trackName & " | " & artistName & " | " & albumName
else
set trackInfo to "Nothing playing"
end if
do shell script "echo " & quoted form of trackInfo & " > $HOME/Desktop/Test.txt"
end tell
else
set trackInfo to "Nothing playing"
do shell script "echo " & quoted form of trackInfo & " > $HOME/Desktop/Test.txt"
end if
Everything worked fine but in OBS i can't open a txt file, even if i select "select txt files".i threw together this apple script to grab the itunes now-playing info and write it to a text file every 5 seconds... kind of a hack but it works
https://github.com/dzomb/tuneout
In properties for the text element, underneath the checkboxes for "read from file" and "chat log mode" is a text field for the file name, and a "browse" button.But if i check that option i still can't select the txt file!