1 Star 0 Fork 0

雷帅 / 成语接龙微信作弊器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TIM.py 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
雷帅 提交于 2020-02-02 18:23 . first commit
import uiautomation as auto
from pypinyin import lazy_pinyin
import pickle
import time
import random
print("正在读取成语库,请稍后")
d = pickle.load(open("idiom.pk","rb"))
chat_name = input("请输入准确的聊天名称")
my_name = input("请输入我在群聊中的名称,以防止接龙自己")
print("程序将在3秒后启动,请讲TIM置顶并将光标锁定输入框")
for i in range(30):
print('\r'+'='*i + '>' + '.'*(30- i - 1), end='', flush=True)
time.sleep(0.1)
qq_ui = auto.WindowControl(searchDepth=1, ClassName="TXGuiFoundation")
fulian_window = qq_ui.ListItemControl(Name=chat_name)
last = ""
res = "。。"
while True:
if last != fulian_window.GetLegacyIAccessiblePattern().Value:
last = fulian_window.GetLegacyIAccessiblePattern().Value
if last.find(my_name) > -1 or res.find(fulian_window.GetLegacyIAccessiblePattern().Value) > -1:
continue
print(last)
try:
py_last = lazy_pinyin(last[-1])[0]
res = random.sample(d[py_last], 1)[0]
print(res)
auto.SendKeys(res)
auto.SendKeys('{enter}')
except:
pass
else:
time.sleep(1)
Python
1
https://gitee.com/RADIUMSCRIPTTANG/idiom_jielong_wechat_cheater.git
git@gitee.com:RADIUMSCRIPTTANG/idiom_jielong_wechat_cheater.git
RADIUMSCRIPTTANG
idiom_jielong_wechat_cheater
成语接龙微信作弊器
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891