giovedì, ottobre 23, 2014

Automatically running multiple instances of Skype via cygwin

function app_skype {
        user=$1
        password=$2
        echo running skype $user
        before=`ps -Ws | grep -i "skype.exe" | awk '{print $1}'`
        after="${before}"
        cygstart "${USERDRIVE}/PortableApps/PortableApps/SkypePortable/SkypePortable.exe" /secondary /minimized /username:${user} /password:${password}
        echo waiting for skype pid...
        while [ "$before" == "$after" ] ; do
                after=`ps -Ws | grep -i "skype.exe" | awk '{print $1}'`
        done
        echo waiting for skype to listen...
        for pid in ${after} ; do
                ok=""
                while [ -z "${ok}" ] ; do
                        ok=`netstat -nao | grep -E " LISTENING\s+${pid}\$"`
                done
        done
}

app_skype john.smith mysecretpassword
app_skype johnny76 myothersecretpassword
app_skype pepito.sbazzeguti lamiapassword

3 commenti:

Unknown ha detto...

Mico c'era già questa pagina sull' internet
http://amicomico.blogspot.it/2014/10/automatically-running-multiple.html
così crei solo entropia!
:)

Unknown ha detto...

ho sbagliato il link
https://support.skype.com/en/faq/FA829/how-can-i-run-multiple-skype-accounts-on-windows-desktop

Mico ha detto...

Eh si, ma quello ti da solo le indicazioni su come usare la command line, non aspetta mica che uno skype sia operativo prima di lanciare il successivo. Se non aspetti non parte una cippa !