//QQ2010自动登录
//支持qq简体中文版,英文国际版
import process
import fsys.lnk;
import winex;
import key; 

//查找qq安装路径
qq = fsys.lnk.search("qq.exe")

//运行qq
process.execute(qq);

//等待QQ窗口创建并激活
qqhwnd,qqnumber,tid,pid = winex.waitActive( "<QQ2010>|<QQ Internation>" , ,"TXGuiFoundation","ATL\:\d+")
 
//输入QQ号
winex.say("829056",qqnumber)

//查找密码输入框
qqpwd=winex.findEx(qqhwnd,1,"Edit")
 

//按退格20次，清除原来的密码
key.repeat('\t',20)
 
//输入密码
key.send('abc123&^#5')

key.press("ENTER")

//等待登录窗口关闭
winex.waitClose(qqhwnd)