Libraries: Skype Control Library

 

Skype Control Library:

Library to work with Skype.

Author: Andrey Voytenko

 
It is seemed that Skype has block this api. When i send msg, it said access denied. so sad.
 
Thank for your topic - but i do as your guiding and meet the error : User Not authorized - how can i do now .
 
hellboy52446:
Thank for your topic - but i do as your guiding and meet the error : User Not authorized - how can i do now .
Sorry. But this library does not work in newer versions of Skype.
 
thank for your help, but i had installed older versions of Skype and this error still happen.
 
hellboy52446:
thank for your help, but i had installed older versions of Skype and this error still happen.

Hi,

It works. I use the latest skype and the latest (745) MT4 and my expert can send me IM. I think you used wrong code in your EA.
In new MT4 You should use: 

int SkypeSendInstantMessageW(string skype_name,string message,int status);
int SkypeSendSmsMessageW(string phone_number, string message);

The "SkypeSendSmsMessageA" or SkypeSendInstantMessageA won't work.
So you should modify the import section in your EA too:

//--- import functions
#import "SkypeMQL.dll"
int SkypeSendInstantMessageW(string skype_name,string message,int status);
int SkypeSendSmsMessageW(string phone_number,string message);
#import

The status in the code shouldbe : STATUS_OFFLINE otherwise this will cause a sending error...

//--- send IM
   err = SkypeSendInstantMessageA(InpSkypeName,InpTextMessage,STATUS_OFFLINE);
   if(err==ERROR_NO_ERRORS) msg="Sent IM to " + InpSkypeName + ", " + InpTextMessage;
   else msg="Error sending IM to " + InpSkypeName + ", error: " + SkypeErrorToStr(err);
   Print(msg);


And this section should be this:

string SkypeErrorToStr(int err_no)
{
   switch(err_no)
   {
      case ERROR_UNKNOWN:     return("Unknown error");
      case ERROR_NO_ERRORS:   return("No error");
      case ERROR_ATTACH:      return("Do not attach");
      case ERROR_AUTHORIZED:  return("User not authorized");
      case ERROR_STATUS:      return("Wrong status");
      case ERROR_TIMEOUTS:    return("Timeout is over");
      case ERROR_RUNNING:     return("Skype is not running");
      case ERROR_SENDING:     return("Error sending");
      case ERROR_VALUE:       return("Wrong value");
      case ERROR_ACCESS:      return("Access denied");
      case ERROR_SKYPE4COM:   return("Skype4COM not registered");
   }
   return("");
}
 
filewalker:

Hi,

It works. I use the latest skype and the latest (745) MT4 and my expert can send me IM. I think you used wrong code in your EA.
In new MT4 You should use: 

The "SkypeSendSmsMessageA" or SkypeSendInstantMessageA won't work.
So you should modify the import section in your EA too:

The status in the code shouldbe : STATUS_OFFLINE otherwise this will cause a sending error...


And this section should be this:

After the corrections it will work to 1 username. 

 

How can we use to Group Conversion/Chat? Here is sample that could help , http://stackoverflow.com/questions/10316533/how-do-i-send-a-message-in-a-group-chat-in-skype-with-skype4com 

How do I send a message in a group chat in Skype with Skype4COM?
How do I send a message in a group chat in Skype with Skype4COM?
  • stackoverflow.com
I've been trying to make a "Skype Bot" in C#. So far I've successfully been able to get it to work in one on one chats. I can't get it to work in group chats. Here's my source: Where it sends the...
 
This looks like a very nice tool. Can you confirm that it works currently? from the comments, it seems it may be broken?
 
filewalker:

Hi,

It works. I use the latest skype and the latest (745) MT4 and my expert can send me IM. I think you used wrong code in your EA.
In new MT4 You should use: 

The "SkypeSendSmsMessageA" or SkypeSendInstantMessageA won't work.
So you should modify the import section in your EA too:

The status in the code shouldbe : STATUS_OFFLINE otherwise this will cause a sending error...


And this section should be this:

thanks Filewalker ,, just wonder ,, does this Skype EA still work well in 2020 please? I need to send a simple instant message from mt4 to phone.

im totally new to sending message with Skype & seems that I cant download the " skype4com.dll "? :/

,, btw, if anyone knows how to send instant message with Skype,, please help :)

Reason: