Since implementing Lync at my work place the status updates have taken off within the work place. After a few months of trying to keep them current I decided it was time to do something more automated. I decided my Last.fm Recently Listened Tracks was good enough.
I started off by linking Spotify to my Last.fm account. I chose the Last.fm list because I already had the account and the Recently Listened Tracks has an RSS feed. That way I can scrape the feed and pull the latest track to display in Lync.
The rest of this is hard to explain so I am just going to post the script I put together. The Lync part of this status is thanks to Ravikanth, you can easily spot hit portion since it is commented. The parsing of the RSS was yours truly.
Grab a copy here. You will need to update line 3 and 6 to fit your situation.
I set this up using Task Scheduler and have it run every 5 minutes.n