This isn't a particularly technical solution, but it might get you thinking in the right direction. You can enable the "Stereo Mix" (on some hardware this option seems to be well hidden, but AFAIK it's always there) as a recording device via control panel (i.e. the output from the Windows mixer that is played to your speakers/headphones). It will then show up in the list of potential microphones in Skype (whether or not they can be changed mid call, I don't know).

Sadly I can't tell you how to automate the above...