Jump to content
Sign in to follow this  


Recommended Posts


I am posting this information for those who have an interest in the Skype4Com Public API and AutoIT Connecitivty

In some code example in the Skype4Com documention this is is how the Attach command is documented which for readers has been converted from VB to AutoIT. $oSkype.Attach() ;//System Sets the Default Protocol Value () to 5 $oSkype.Attach(5) ;//Default Protocol Value (5) Enforced It has been recommended by a Skype4Com C++ and VB developer that this call should always use 'Protocol' 8 [undocumented in the Skype4Com Manual] but apparently its to overcome compatibility issues in previous Skype4Com versions [information not validated by me] . If adopted [and yet to be fully tested by me] this command would be changed to this: $oSkype.Attach(8) AND

In Skype Version the $oSkype.Client.IsRunning command does not work as it returns 'false' irrespective of whether Skype is running or not. This is a known bug in Skype 5 but I am not sure if or when it will be fixed by Skype. If not replaced with the AutoIT script equivalent then when called it simply sets the focus on the Skype window. If Not $oSkype.Client.IsRunning Then

The AutoIT workaround is If Not ProcessExists(skype.exe) Then


The SMS Identity be it either the User ID or Validated Mobile Number is no longer supported in Skype 5 and if the Skype Version 4 of the AutoIT Code is used to send an SMS when Skype 5 is the installed version the SMS will fail when 'Composing' with Skype returning the value 2 .

This is the coded example of my Skype Version 4 and 5 workaround.

Func _SendSMS($PhoneNum, $Message, $sSMSIdentity)
;//Read the Skype Version
  $SkypeVer = StringLeft(FileGetVersion(@ProgramFilesDir & "\Skype\Phone\skype.exe"), 1)
  ;//Skype Version 4 SMS Send Process
  If $SkypeVer = 4 Then
   ;//Compile the SMS Identity [Skype 4 only] if the third attribute is Null or not present the SMS Identity is automatically set to the User ID by Skype.
   Local $sSMSID = $oSkype.CurrentUserprofile.ValidatedSmsNumbers()
   If $sSMSIdentity <> $sSMSID Then $sSMSIdentity = ""
   ;//Send the SMS Message
   $oSms = $oSkype.SendSms($PhoneNum, $Message, $sSMSIdentity)
  ;//Skype Version 5 SMS Send Process
  If $SkypeVer = 5 Then
   Local $ismsmessage = $oSkype.CreateSms($smsMessageTypeOutgoing, $PhoneNum)
   $ismsmessage.Body = $Message
  ;//Wait for Skype API

I would especially like to thank jaberwocky6669 for his assistance with the code required to send an SMS in sSkype Version 5 Ant.. :)

Edited by anixon

Share this post

Link to post
Share on other sites

i have solved the attach issue in my skype script. have a look at:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.