Archive

Archive for September, 2013

Send Message Skype in the middle of automation

September 26, 2013 2 comments

Hello guys, sorry for my lateness to write for you, but I’m trying to gain the certificate of CTAL, and I have studied a lot. So, I will show one function to send a skype message in the middle of automation. This is very usefull when occurs some error and you have to send on the exactly moment to some developer or responsible.

First you have to download the lib of skype: skype-java-api-1.4.jar , after creates a class, and after the function.

This is my example of function, you have to installed the skype in the machine that will execute the automation.

Add the people will receive this message. In the skype config permits others application use, maybe you have to execute the first time and after, go to skype and enable the advertisement that will be showed, asking for permission of use skype.

Function:

package Test;

import com.skype.ContactList;            // Import the classes of lib.
import com.skype.Friend;
import com.skype.Skype;
import com.skype.SkypeException;

public class MessageSkype_Send {

public static void Errors_Send() throws SkypeException {
try {

ContactList list = Skype.getContactList();

Friend resp = list.getFriend(userIdSkype);        // Change the skype name
resp.send(“(*) Error Automation \n“);            // This is the message that will be send

} catch (Exception e) {

System.println(e.getMessage());
}
}
}

Advertisements
%d bloggers like this: