How to Make a Skype...
 
Notifications
Clear all

How to Make a Skype Tool


anxify
Posts: 203
Topic starter
(@anxify)
Estimable RivalGamer
Joined: 8 years ago

Using the Skype4Com library

Hello, and welcome to another tutorial 🙂 I am sorry that I haven't been all that active recently 🙁 ,but I hope this will make up for it. In advance I do apologize for any grammatical errors or anything that isn't explained correctly. If you have any queries feel free to message me or post on this thread 😀

Setting up the library in Visual Studio
[HIDE]This part is written just for Visual Studio, but I assume that it will be a very similar way of adding the reference in other IDE

In the "Solution Explorer" section right click on "References" and click on "Add Reference". Then go to the "Browse" tab and navigate yourself to the location where you downloaded the library to. After you have selected the library and clicked on "OK", you are ready to start. In the class where you are going to be using the Skype instance and with the other "using"s place "using SKYPE4COMLib;" or whatever the name of the library was for you.
You have finished this step, congrats.[/HIDE]

Hooking the library up to your Skype

[HIDE]Note: If you haven't set up the library, please go back a section. If you get any errors such as:
Quote:The type or namespace name 'Skype' could not be found (are you missing a using directive or an assembly reference?) Also go back a section.[/HIDE]

Make an instance of the Skype class

Skype skype;

Then initialize it on the loading of the program:
[HIDE]

skype = new Skype();

[/HIDE]

Then attach it to your Skype:

[HIDE]

skype.Attach(skype.Protocol, true);

[/HIDE]

This attaches it to your current Skype, but using the second parameter as "true" means that the program will wait until Skype verifies that it is attached, feel free to make this false (if you do, and you try to do something with the Skype object before it is attached, the program will throw an exception).

And that covers this section, thank you for reading.

Modifying your profile
To edit your mood message as plain text you can use:

[HIDE]

skype.CurrentUserProfile.MoodText = "Your text";

[/HIDE]

However, if you want to modify your mood message to contain HTML, you can use:

[HIDE]

skype.CurrentUserProfile.RichMoodText = "Your HTML code";

[/HIDE]

If you want to change your display name you can use:

[HIDE]

skype.CurrentUserProfile.FullName = "Your new name";

[/HIDE]

You can find a lot of nifty things to do with this section, but I won't include examples of everything. Thank you for reading.

Sending a message
[HIDE]Using this library you can either send a message to a username, or to a group chat. If you are sending a message to a specific contact you will be needing to use their Skype name, which is called a "handle". Sending a message to a single contact requires this format: [/HIDE]

[HIDE]

SendMessage(username, message)

[/HIDE]

So you can use:

[HIDE]

skype.SendMessage("username", "this is a message");

[/HIDE]

That covers sending a message to a specific user, now lets move on to group conversations.

Group Conversations

To select your currently open group, we will need to select the active chat. You can select the active chat by:

[HIDE]

Chat chat = skype.ActiveChats[1];

[/HIDE]

And simply from there you can use:

[HIDE]

chat.SendMessage("this is a message");

[/HIDE]

Okay, that covers sending it to the current group. Here's an example of sending a message to every online contact:

[HIDE]

foreach (User u in skype.Friends) {
	  if (u.OnlineStatus != TOnlineStatus.olsOffline){
	  skype.SendMessage(u.Handle, string.Format("Hello, you are online and your display name is "{0}"", u.FullName != null ? u.FullName : "null"));
	  }
	}

[/HIDE]

There are endless possibilities for this, but that concludes this section.

Reply
Name of the Video Game, and any other Tags
1 Reply
LEGACYY
Posts: 2350
(@legacyy)
Noble RivalGamer
Joined: 9 years ago

Using the Skype4Com library

Hello, and welcome to another tutorial 🙂 I am sorry that I haven't been all that active recently 🙁 ,but I hope this will make up for it. In advance I do apologize for any grammatical errors or anything that isn't explained correctly. If you have any queries feel free to message me or post on this thread 😀

Setting up the library in Visual Studio
Hidden content cannot be quoted.

Hooking the library up to your Skype

Hidden content cannot be quoted.

Make an instance of the Skype class

Skype skype;

Then initialize it on the loading of the program:
Hidden content cannot be quoted.

Then attach it to your Skype:

Hidden content cannot be quoted.

This attaches it to your current Skype, but using the second parameter as "true" means that the program will wait until Skype verifies that it is attached, feel free to make this false (if you do, and you try to do something with the Skype object before it is attached, the program will throw an exception).

And that covers this section, thank you for reading.

Modifying your profile
To edit your mood message as plain text you can use:

Hidden content cannot be quoted.

However, if you want to modify your mood message to contain HTML, you can use:

Hidden content cannot be quoted.

If you want to change your display name you can use:

Hidden content cannot be quoted.

You can find a lot of nifty things to do with this section, but I won't include examples of everything. Thank you for reading.

Sending a message
Hidden content cannot be quoted.

Hidden content cannot be quoted.

So you can use:

Hidden content cannot be quoted.

That covers sending a message to a specific user, now lets move on to group conversations.

Group Conversations

To select your currently open group, we will need to select the active chat. You can select the active chat by:

Hidden content cannot be quoted.

And simply from there you can use:

Hidden content cannot be quoted.

Okay, that covers sending it to the current group. Here's an example of sending a message to every online contact:

Hidden content cannot be quoted.

There are endless possibilities for this, but that concludes this section.

Something fresh, Good work Felony 🙂

Reply