I had a hit when I was doing this in python. It runs in the background as a daemon, pausing / resuming highlighting when called. It uses the Python libraries for Skype and Spotify:
http://code.google.com/p/pytify/
https://developer.skype.com/wiki/Skype4Py
import Skype4Py
import time
from pytify import Spotify
skype = Skype4Py.Skype()
skype.Attach()
spotify = Spotify()
spotifyPlaying = spotify.isPlaying()
def on_call_status(call, status):
if status == Skype4Py.clsInProgress:
global spotifyPlaying
spotifyPlaying = spotify.isPlaying()
if spotify.isPlaying():
print "Call started, pausing spotify"
spotify.stop()
elif status == Skype4Py.clsFinished:
if spotifyPlaying and not spotify.isPlaying():
print "Call finished, resuming spotify"
spotify.playpause()
skype.OnCallStatus = on_call_status
while True:
time.sleep(10)
source
share