Quick Script for Adding Skype Groups

Posted by Robert May on Geeks with Blogs See other posts from Geeks with Blogs or by Robert May
Published on Thu, 24 Feb 2011 23:34:37 GMT Indexed on 2011/02/25 7:25 UTC
Read the original article Hit count: 333

Filed under:

So, I needed to add about 30 people to several different Skype groups today, and I didn’t want to repeat the /add [skypename] thing over and over and over.  Building the list was a pain . . . I couldn’t find a good way to extract all of the users in an existing group.  There’s probably an api or something, but I just did that part by hand.

Adding them to the groups was pretty easy with Windows Scripting Host.  Basically, I just ran this:

<package>
   <job id="vbs">
      <script language="VBScript">
         set WshShell = WScript.CreateObject("WScript.Shell")
         WshShell.AppActivate 4484
         WScript.Sleep 100

         WshShell.SendKeys "/add user1~"
         WScript.Sleep 100

         WshShell.SendKeys "/add usern~"
         WScript.Sleep 100
      </script>
   </job>
</package>

Add as many users as you need by copying the sendkeys and sleep lines.  Then, save the script to a .wsf file.  The AppActivate line needs to be changed to have the process id of skype instead of the number there.  To get that, open up Task Manager, click on Processes, then find skype.exe and find it’s PID.

Before you double click on the file in windows explorer, you’ll need to have created the groups in skype.  For each group, open the group, and click in the chat window of the group.  Then double click on the WSF file.  If you don’t click in the chat window, you will likely get the add user dialog box instead of just adding the users.

Technorati Tags: ,

© Geeks with Blogs or respective owner