Skype automation

Exclusive offer: get 50% off this eBook here
Instant AutoIt Scripting [Instant]

Instant AutoIt Scripting [Instant] — Save 50%

Learn how to master AutoIt, an open source framework for automating Windows GUI with this book and ebook

$12.99    $6.50
by Emilio Aristides de Fez Laso | August 2013 | Games Microsoft Open Source

This article created by Emilio Aristides de Fez Laso author of Instant Autolt Scripting discusses about how Skype can be automated to aid in communications.

Skype sends messages to a selected user. Consider two similar SendChat functions as an example. Echo123 is Skype's default sound test user. Change it to another user name you want from user properties (space not allowed).

(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:


Instant AutoIt Scripting [Instant] Learn how to master AutoIt, an open source framework for automating Windows GUI with this book and ebook
Published: July 2013
eBook Price: $12.99
See more
Select your format and quantity:

About the Author :


Emilio Aristides de Fez Laso

Emilio Aristides de Fez Laso is a freelancer, developer, analyst, tester, and open source author. He is the admin, dev, and forum founder of www.Autoit.es, and works at the support desk under the name BasicOs.

Being an MS Basic and xBase programmer in the 80's, he started creating programs with a Casio Pocket Personal Computer (1 KB RAM, PB-100).

During the 80's and 90's, he worked on xBase, Access, MS Visual Basic, and other Basic-like programming languages. He has also worked as an xBase developer for government agencies. Later, he created customized apps for real estate agencies, lawyers, and others. He also created apps for fields such as Tourism, Accountancy, and Management.

In the last few years, he has worked on operating system migration and support. He also worked at the support desk for several government agencies and created automation and enterprise customized solutions. He has performed interactive programming with Autolt, Robotics, Automation and Interactive web pages, and Client/Server operating systems and interfaces. He has been a contributor to WordPress Duplicator Plugin development.

He is also a professional HR and organization psychologist. He has been interested in user iteration, friendly user interface development, social hacking, and anti-malware. He is keen to share knowledge and teach. He works on improving the user experience and human adaptation to computers and also on improving the quality of apps to get better reviews. He is an analyst who works on simplifying apps and on their improvement and testing. He also worked on several government projects, training mentally and physically handicapped people to learn computing since many years. He dreams of creating the right

Books From Packt


 Web Services Testing with soapUI
Web Services Testing with soapUI

Windows Server 2012 Automation with PowerShell Cookbook
Windows Server 2012 Automation with PowerShell Cookbook

 BMC Control-M 7: A Journey from Traditional Batch Scheduling to Workload Automation
BMC Control-M 7: A Journey from Traditional Batch Scheduling to Workload Automation

Getting Started with Microsoft Lync Server 2013
Getting Started with Microsoft Lync Server 2013

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition
Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition

SQL Server 2012 with PowerShell V3 Cookbook
SQL Server 2012 with PowerShell V3 Cookbook

 PowerShell 3.0 Advanced Administration Handbook
PowerShell 3.0 Advanced Administration Handbook

Microsoft Exchange 2010 PowerShell Cookbook
Microsoft Exchange 2010 PowerShell Cookbook


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software