iTunes가 현재 재생중인 노래의 이름을 알고 싶습니다. 어떤 API를 참조해야합니까?iTunes에서 현재 재생중인 노래 가져 오기
대시 보드 위젯이나 Java/python 응용 프로그램 모두에 사용하기 쉽기 때문에이 두 가지를 모두 사용하고 싶습니다.
나를위한 참고 자료가 있으십니까? 나는 그 어떤 방법으로 당신을 도움이되기를 바랍니다
on run
set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set trackname to name of current track
end if
end tell
end if
return trackname
end run
- 사전에
감사합니다, 마리오
노래 변경 이벤트에 대한 정보를 얻거나 노래가 변경되었음을 인식하기 위해 폴링을해야합니까? – mariosangiorgio