因此,我正在为我的小组制作我自己的skype机器人,但我不知道如何检索我生活中的最新消息。我很快就查阅了互联网和stackoverflow,因为我经常处理一些小问题,但在Skype4Py文档中几乎没有关于特定函数的文档,这里也没有关于stackoverflow的文档。这是我的代码,请帮帮忙?
#Importing!
import time, sys
import Skype4Py
#Set skypeclient and connect, while also setting my desired user
skypeClient = Skype4Py.Skype()
skypeClient.Attach()
user = sys.argv[1]
#Loop!
while 1:
"""
Here I am stumped. I have tried skypeClient.Chat.GetRecentMessages(),
skypeClient.Chat.Chat.GetRecentMessages
and that wouldn't even work for my purposes if it did work!
"""发布于 2014-12-17 11:03:59
使用
def Commands(Message, Status):
if Status == 'SENT' or (Status == 'RECEIVED'):
running = 1
message = Message.Body.lower()
handle = Message.FromHandle.upper()
if running == 1:
if message == 'WHATEVER':后来,
skype = Skype4Py.Skype()
skype.OnMessageStatus = Commands
skype.Attach()
while True:
pass对我很管用!
https://stackoverflow.com/questions/27305402
复制相似问题