Categories: Tutorials

Skype automation

2 min read

(For more resources related to this topic, see here.)

Getting ready

We will start by opening SciTE from the AutoIt Program Group and start writing source code. Open the Skype app (Version 3.0 and above must be installed). Download it from http://www.autoitscript.com/forum/topic/121767-skype-udf-v0-7- april-13-2013/, and copy and paste the Skype.au3 library file to the same folder as Skypetemplate.au3.

How to do it…

Copy and paste the source code into a new script called the Skypetemplate.au3 file, and run the script by pressing F5.

#include "Skype.au3"
;Credits Basicos ; And to Firefox Skype.au3,SendChat UDF
SendChat1("I will be at home in 10 minutes","echo123")
SendChat2("I will be at home in 15 minutes","echo123")
Func SendChat1($message,$destination)
Local $iChatId, $oChat ;using chat id:
$iChatId = _Skype_ChatCreate("echo123") ;Skype test Service
_Skype_ChatMessage($iChatId, "test")
EndFunc
Func SendChat2($message,$destination)
Local $iChatId, $oChat ;using chat object:
$oChat = _Skype_ChatCreateWith("maribelnv") ; your friend
_Skype_ChatSendMessage($oChat, "test3")
EndFunc

How it works…

In Skype.au3 functions, Skype4COM provides an ActiveX interface to the Skype API such as Visual Studio or Delphi. It is an external user defined function (UDF), created and provided free for a Firefox user.

COM stands for Component Object Model. It is the Microsoft way to interconnect software using a common interface defined in a COM object.

You can do most of your programming with AutoIt’s built-in functions, use this only for special interfacing to some applications. Objects depend heavily on the operating system and the installed software.

There’s more…

Skype.zip downloaded files include an example for auto call answer to answer calls automatically (and it joins calls if you’re already in a call):

  • Using an event call:

    _Skype_OnEventCallStatus("_CallIncomming", $cClsRinging) ;if
    someone is calling you _Skype_OnEventCallStatus("_CallFinished",
    $cClsFinished) ;if a call has finished
    While 1
    Sleep(60000)
    WEnd

  • Using call answer and call join functions:

    If IsObj($oMainCall) Then ;if a call is running then join the
    incomming call to the main _Skype_CallJoin($oMainCall, $oCall)
    Else ;else answer
    _Skype_CallAnswer($oCall)
    EndIf

Summary

This article discussed about how you can automate calls, answer them, and use Skype to create automation in your communications.

Resources for Article :


Further resources on this subject:


Packt

Share
Published by
Packt

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago