#!/usr/bin/python
# -*- coding: utf-8 -*-
import Skype4Py
skype = Skype4Py.Skype()
skype.Attach()
chats = skype.Chats
user = 'skype_login'
for c in chats:
if user in c.Name:
for m in c.Messages:
if m.Sender.Handle == user and '@gmail.com' in m.Body:
print m.Body
exit(0)
Everything was ok, but 1 message was skipped.
If I will remove exit(0), I will see all messages except 1:
somelogin1@gmail.com
And after resending the same text, new message is present in c.Messages, but old message still lost.
I was tried to remove all conditions in my code - did not help
My skype bot takes emails from 1 user:
Everything was ok, but 1 message was skipped. If I will remove exit(0), I will see all messages except 1:
And after resending the same text, new message is present in c.Messages, but old message still lost.
I was tried to remove all conditions in my code - did not help