How to sned and receive chat messages programmatically? - automation

When I get a chat message from someone on FB or Gmail, how do I go about creating a program that detects the message and then executes some commands accordingly, all programmatically?
Solutions in C++, Java or Python would be useful.

A suggestion
Use java & jabber (also called xmpp) protocol
Install the smack library (jabber library for java, really good!)
Read about the jabber protocol, in your case pay special attention to the "<presence>" message. The "<presence>" messages will tell you whenever someone connects/disconect/change status on a jabber server.
Code

You need to use an API for Gmail in a language of your choice. Facebook uses Jabber (XMPP) which, again, has APIs in many languages.
You are unlikely to simply receive a solution here, this site works more on a basis of helping you with some code that you've already written.

Related

How to find out with which language Telegram bot's API is written?

Most of the Telegram bots has API behind them to interact with their users. Is there a way to recognize which programming language is used (PHP, Python, NodeJS, ...) for bot's API?
For example, this bot: #weatherman_bot
Most times some telegram (tg) bots have the code on github, you can just look through their code and from there know which language it was written in.
An example would be a todobot I made: #my_todos_bot the source code is available on github. By the way the bot is currently active and working.
But basically knowing the language doesn't really determine how to bot will function because tg supports lots of languages from which you can choose from. I personally make mine in Nodejs but you can do it in whichever you choose (and is supported by tg).

How to fetch POP3/SMTP email using Cordova

I'm new to mobile development and have been looking for a way to retrieve basic email information from simple POP3/SMTP email servers.
I've seen many posts on how to send email using numerous Cordova plugins, etc., but I'm simply trying to retrieve email information for various listing and analysis purposes.
Is this even possible?
Thanks for the help and suggestions on where to start.
Cordova does not have built-in functionality for POP3/SMTP access. As inside your codova app you are running in the javascript/webview sandbox, you don't have socket access, so you can't implement this kind of functionality there.
This leaves you no choice but to implement a Cordova Plugin. You are in Objective-C land now, but unfortunately there aren't any convenient classes in the standard framework for accessing POP3/SMTP. Your best bet is using a library like MailCore.
Details on how to implement a Cordova Plugin (as well as passing the relevant email data from and to your javascript layer) are outside the scope of a simple StackOverflow answer, but the process is (fortunately) well documented.

Make twilio leave a message after the beep

I am using Twilio to make calls to my clients to remind them of certain dates. Since some people dont pick up these calls, I would like to make my Twilio leave a voice message on their answering machines.
Is that possible? If yes how?
Thanks
From the RestAPI docs about the IfMachine parameter:
If Twilio detects that a machine, not a human, has answered the call, Twilio will make a request to your application URL setting 'AnsweredBy' to 'machine'. The call flow will proceed as normal, and your application can choose to customize the content of the call for a recorded greeting. Twilio will wait until the familiar "BEEP" of an answering machine to begin executing your call flow, so the machine (or voicemail) will capture <Play> or <Say> content. Keep in mind that if a machine answers you'll want to avoid using <Gather> or <Record> because they require user input.
Also note:
Answering machine detection is an experimental feature, and support is limited.

VB.NET Use API Messenger

I know how you can use the api in vb.net IM
I wish simply by pressing a button sends a message to all my contacts.
I apologize for my ignorance but I'm still learning, thanks
You don't mention what IM network you're talking about so I'm assuming you're talking about Live Messenger. If that's not the case, only the bit about Pidgin might still be relevant.
Unfortunately, my understanding is that nowdays there's no easy API for doing what you want, and you might have to write your own client to do this, here's a website that discusses the protocol:
http://www.hypothetic.org/docs/msn/index.php
You might also want to look at Pidgin since it supports Messenger and is open source:
http://www.pidgin.im/download/source/
There's a Live Messenger API, but I don't think that can be used to send a message from a standalone VB.Net desktop client since it seems more for writing Addins to the standard Live Messenger client, but here's the information about it in case I'm wrong:
http://msdn.microsoft.com/en-us/library/aa905675.aspx
If you're running XP or earlier you might be able to use the Windows Messenger SDK:
http://msdn.microsoft.com/en-us/library/ms630961%28v=VS.85%29.aspx

Set instant messenger display message programmatically

Would a script that sets display messages for instant messengers be simple or complex? After some searching, there doesn't seem to be any information about this at all.
For the sake of an example, if I had a text file of quotations, would it be possible to have the google talk display message change to a different quotation hourly?
Depends on which client you're using. As far as I know, Google's client doesn't offer any interface for plugins, but the open source instant messenger Pidgin does. I think there already is a plugin for what you want to do, but you can write your own using the documentation and examples they give you.
The complexity of writing something like this is based on how much C or Perl you know, since you can program in either of those for Pidgin. Reading code from other people's plugins, you should be able to figure out the Pidgin API.
You can use Kik API to programmatically send rich content and files between mobile applications. It is available for iPhone and Android platforms and takes only about 5 lines of code to integrate into your app. There is more info at the API website: http://www.kik.com/dev
Disclaimer: I'm on of the developers behind Kik API :)