James ...thank you for the feedback ... and the time you invested...
1. this happens everytime ..
2. the command I posted is a simplified version, just to demonstrate the issue. the real command will check the caller, if it is me or my girlfriend it will save the current input / output devices, then change those to link skype to VC ... so we can command it through skype ... if, let's say my dad is calling none of that happens and I can pick up skype call normally and talk with my dad and see him on the big screen
...
once the call is finished, things are reversed to what it was before the call... now since the command is running twice ... the variables that store the previous IO for audio get over written and when the call ends ... nothing is restored ...
I will try to find a solution ...
again many thanks for all the support you give