Jump to content



Recommended Posts

This is 'Wolf's' code [acknowledged as published elsewhere in this Forum] for sending an SMS using his SkypeAPI. The code works perfectly with the exception that the ReplyToNumber is

not that set in Skype Tools/Options/IM&SMS/SMS Settings/When sending an SMS identify me by: my mobile phone number. The set phone number has been validated by the Skype application

however the SMS sent using the AutoIT SkypeAPI has been assigned a 7 Digit number as the Reply to Number not the validated mobile phone number. If you send an SMS using the Skype program the ReplyToNumber is the validated number displayed in the Menu.

;// Create a Skype4COM object:
$oSkype = ObjCreate("Skype4COM.Skype")
$oSkypeEvent = ObjEvent($oSkype,"Skype_")
$oError = ObjEvent("AutoIt.Error","MyErrFunc")
;// Start the Skype client:
If Not $oSkype.Client.IsRunning Then
;// Verify that a user is signed in and online before continuing
While 1
 If $oSkype.CurrentUserStatus = $oSkype.Convert.TextToUserStatus("ONLINE") Then
;// Send SMS:
$oSMS = $oSkype.SendSms("+61999999999", "Hello!")
;// Message event handler:
Func Skype_SmsMessageStatusChanged($aSms, $aStatus)
 MsgBox(0,"","Sms " & $aSms.Id & " status " & $aStatus & " " & $oSkype.Convert.SmsMessageStatusToText($aStatus))
;// Target event handler:
Func Skype_SmsTargetStatusChanged($aTarget, $aStatus)
 MsgBox(0,"","Sms " & $aTarget.Message.Id & " target " & $aTarget.Number & " status " & $aStatus & " " & $oSkype.Convert.SmsTargetStatusToText($aStatus))
;// The AttachmentStatus event handler monitors attachment status and automatically attempts to reattach to the API following loss of connection:
Func Skype_AttachmentStatus($aStatus)
 MsgBox(0,"","Attachment status " & $oSkype.Convert.AttachmentStatusToText($aStatus))
 If $aStatus = $oSkype.Convert.TextToAttachmentStatus("AVAILABLE") Then
Func MyErrFunc()
 ;Do Nothing

This is the 'C' code [which I am not familar with] for changing the 'ReplyToNumber'

                            // Change this telephone number to a valid one
                            String MySmsNumber = "+13125551212";
                            String MySMStext = "This is a test message";
                            ISmsMessage ismsmessage = skype.CreateSms(TSmsMessageType.smsMessageTypeOutgoing, MySmsNumber);
                            ismsmessage.Body = MySMStext;
                            // This must be one of your validated SMS numbers
                            ismsmessage.ReplyToNumber ="+13125551212";
                        catch (Exception e)

Is there anyone on Forum that can show me how to modify the AutoIT Code so that the SMS is sent with a valid ReplyToNumber

Help is always appreciated Ant..

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...