Download MetaTrader 5

Libraries: Skype Control Library

To add comments, please log in or register
Automated-Trading
Admin
104212
Automated-Trading  

Skype Control Library:

Library to work with Skype.

Author: Andrey Voytenko

BASE LU
25
BASE LU  
It is seemed that Skype has block this api. When i send msg, it said access denied. so sad.
hellboy52446
6
hellboy52446  
Thank for your topic - but i do as your guiding and meet the error : User Not authorized - how can i do now .
Andrey Voytenko
23704
Andrey Voytenko  
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.
hellboy52446
6
hellboy52446  
thank for your help, but i had installed older versions of Skype and this error still happen.
filewalker
42
filewalker  
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("");
}
torytory
135
torytory  
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...
To add comments, please log in or register