0

我正在使用 32 位 python 在我的 win 8 机器上运行它,当我运行程序时,Skype 正在响应一条消息(在顶部栏中):“另一个应用程序 (python.exe) 正在尝试访问 Skype,但是我们无法响应。请尝试重新启动应用程序”

代码:

import Skype4Py
import socket
import codecs
import sys
#setup
#sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#server_address = ('127.0.0.1', 65205)
#print  'starting up on '+ str(server_address[1])
#sock.bind(server_address)
#sock.listen(1)
#enableling different languages 
UTF8Writer = codecs.getwriter('utf8')
sys.stdout = UTF8Writer(sys.stdout)
#skype setup
skype =Skype4Py.Skype()
availFriends = []
skype.Attach()

#block mode
def mstat(Message,status):
    if(status == Skype4Py.cmsReceived ):#act on receive
        Message.MarkAsSeen()
        print Message.Body
        skype.SendMessage(Message.Sender.Handle,"Did you send me :\n"+Message.Body+"\n good , Stop messaging me!")

def GetAllOnlinePeople():
    availFriends = []
    badStatusCodes = ['UNKNOWN', 'OFFLINE', 'DND', 'LOGGEDOUT']
    for f in skype.Friends:
        if not f.OnlineStatus in badStatusCodes:
            availFriends.append(f)


###########################################3
#connection, client_address = sock.accept()
#print  'connection from'+ str(client_address[0])
# Receive the data in small chunks and retransmit it    
#data = connection.recv(128)
#if data== 'bmode':
skype.OnMessageStatus = mstat
while(1==1):
    i='p'
4

1 回答 1

0

不确定这会有所帮助,但最近我在尝试从 Windows PowerShell启动sevabot时看到了类似的消息表单。请看下面的截图: 在此处输入图像描述

一旦我从 Windows cmd 启动它,该警报就消失了。我的 Skype 版本是 7.16.85.102,Skype4Py 版本是 1.0.35。

希望有帮助。

于 2015-12-15T08:06:26.327 回答