微信多开器,隔离运行,无限多开
https://blog.csdn.net/SHIGUANGTUJING/article/details/101159706有点少哈,那就再贴个代码
# -*- coding: utf-8 -*-
import ctypes, time, signal, psutil, os
import tkinter as tk
RECVTEXTMSG_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p)
RECVPAYMSG_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_wchar_p)
# 初始化SDK
class WXSDK():
# 引入动态链接库
def __init__(self):
self.sdk = ctypes.CDLL("WeChatSDK.dll")
# 初始化接口
def WXOpenWechat(self):
self.pid = self.sdk.WXOpenWechat()
# 多开模块
def Open(num):
wxsdk = WXSDK()
for x in range(0,num):
try:
pid = wxsdk.WXOpenWechat()
# 判断是否打开成功如果PID为空则死循环(可能会死循环)
while(pid == 0):
pid = wxsdk.WXOpenWechat()
time.sleep(0.5)
time.sleep(0.8)
except:
pass
# 结束进程模块
def kill():
# 定义PID字典
pid_dict = {}
# 获取所有PID
pids = psutil.pids()
for pid in pids:
p = psutil.Process(pid)
pid_dict=p.name()
for t in pid_dict.keys():
if pid_dict == "WeChat.exe":
try:
os.kill(t,signal.SIGABRT)
except:
while True:
try:
os.kill(t, signal.SIGABRT)
break
except:
continue
# 1.实例化object,建立窗口
window = tk.Tk()
# 2.给窗口可视化title
window.title("微信多开 2.0")
# 3.设置图标
# window.iconbitmap('1.ico')
# 4.设置窗口大小(窗口居中)
sw = window.winfo_screenwidth()
sh = window.winfo_screenheight()
ww = 300
wh = 300
x = (sw - ww) / 2
y = (sh - wh) / 2
window.geometry("%dx%d+%d+%d" % (ww, wh, x, y))
#锁定大小
window.maxsize(400, 200)
window.minsize(400, 200)
# 设置Label标签
lab = tk.Label(window, text='多开几个?', font=('', 14)).place(x=100, y=35)
# 设置text文本框标签
text = tk.Entry(window, text="2", font=14, textvariable="text")
text.pack()
# 改变text文本框位置
text.place(x=200,y=33,width=50,height=30)
# 俩按钮执行函数
def Open_Wechat():
# 给上面For循环的值,int型
Open(int(text.get()))
def Close_Windows():
kill()
# 俩按钮并设置位置
open_wechat = tk.Button(window, text='立即多开', width=15, height=2, command=Open_Wechat).place(x=50, y=100)
window_close = tk.Button(window, text='关闭全部', width=15, height=2, command=Close_Windows).place(x=200, y=100)
# 循环显示窗口
tk.mainloop() 我写好的成品,Python编写,Pyinstaller打包
https://www.lanzouj.com/i6bsc8f Exception in Tkinter callback
Traceback (most recent call last):
File "D:\Python27\lib\lib-tk\Tkinter.py", line 1541, in __call__
return self.func(*args)
File "F:/Study/untitled2/�Ŷ.py", line 80, in Open_Wechat
Open(int(text.get()))
File "F:/Study/untitled2/�Ŷ.py", line 20, in Open
wxsdk = WXSDK()
File "F:/Study/untitled2/�Ŷ.py", line 12, in __init__
self.sdk = ctypes.CDLL("WeChatSDK.dll")
File "D:\Python27\lib\ctypes\__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: 好多可以呀 学到了谢谢很有帮助 感谢楼主分享 很好,如果有安卓版的就更好 问一下,是不是电脑可以随便双开,不像手机那样非认证会封号? 不错不错 正好学习学习 前面不是有一个吗 看不懂求成品
页:
[1]
2