파 이 썬 QQ 대량 로그 인

#coding=utf-8
__author__ = 'Eagle'
import os
import time
import win32gui
import win32api
import win32con
import SendKeys
from ctypes import *
def QQ(qq,pwd):
    a = win32gui.FindWindow(None, "QQ")
    #  QQ
    os.system('"C:\Program Files (x86)\Tencent\QQ\Bin\QQScLauncher.exe"')
    time.sleep(5)
    a= win32gui.FindWindow(None,"QQ") #        ,  1:   ,  2:   QQ
    loginid= win32gui.GetWindowPlacement(a)
    windll.user32.SetCursorPos(loginid[4][0]+300, loginid[4][1]+273 )
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0,0,0) #    
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0,0,0) #    
    time.sleep(0.2)
    ###    
    SendKeys.SendKeys(qq)
    time.sleep(0.2)
    ##tab  
    win32api.keybd_event(9,0,0,0)
    win32api.keybd_event(9,0,win32con.KEYEVENTF_KEYUP,0)
    SendKeys.SendKeys(pwd)
    #       
    win32api.keybd_event(13,0,0,0)
    win32api.keybd_event(13,0,win32con.KEYEVENTF_KEYUP,0)
#          : 1234567----she123456 #      -   
fn = "C:\\qq.txt" #        ,        
#        
F = open(fn,"r").readlines()
#      ,     ,     
for i in F:
    tx = i.split("----")
    QQ(tx[0],tx[1])

좋은 웹페이지 즐겨찾기