基本上,標題所說的是什麼。我的電腦使用VAC在Teamspeak中播放itunes歌曲,但是我希望它也可以將歌曲名稱和藝術家以及可能的專輯輸入聊天內容中,我想在Windows上,特別是Windows 7上做到這一點。如果這可以在Python中完成,我寧願看到這是幾乎所有我知道的語言。如果它已經完成/可以很容易地用任何其他語言完成,我可以接受任何其他語言。從iTunes獲取當前播放歌曲並自動輸入TeamSpeak聊天
編輯:當我運行代碼abarnert給,我得到這個錯誤。
Traceback (most recent call last):
File "C:\Users\Grant\Documents\AllDerProgramming\ItunesStuffz.py", line 2, in <module>
itunes = win32com.client.Dispatch("iTunes")
File "C:\Python33\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python33\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python33\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)