微信截图_20250108210519.png (9.52 KB, 下载次数: 0)
下载附件
2025-1-8 21:05 上传
使用简单 输入数量点击多开即可【多开前 退出当前登录的微信】
[color=]import
[color=]os
[color=]import
[color=]subprocess
[color=]import
[color=]tkinter
[color=]as
[color=]tk
[color=]from
[color=]tkinter
[color=]import
[color=]messagebox
[color=]def
[color=]launch_wechat_instances
():
[color=]try
:
[color=]# 获取用户输入的多开数量
[color=]count
[color=]=
[color=]int
(
[color=]entry
.
[color=]get
())
[color=]if
[color=]count
[color=]1
:
[color=]raise
[color=]ValueError
[color=]# 微信安装目录
[color=]wechat_path
[color=]=
[color=]r
[color=]"E:\WeChat\WeChat.exe"
[color=]# 请确保路径正确
[color=]if
[color=]not
[color=]os
.
[color=]path
.
[color=]exists
(
[color=]wechat_path
):
[color=]messagebox
.
[color=]showerror
(
[color=]"错误"
,
[color=]f
[color=]"未找到微信可执行文件:
[color=]{
[color=]wechat_path
[color=]}
[color=]"
)
[color=]return
[color=]for
[color=]i
[color=]in
[color=]range
(
[color=]count
):
[color=]# 启动微信实例
[color=]subprocess
.
[color=]Popen
([
[color=]wechat_path
])
[color=]messagebox
.
[color=]showinfo
(
[color=]"成功"
,
[color=]f
[color=]"已成功启动
[color=]{
[color=]count
[color=]}
[color=] 个微信实例。"
)
[color=]except
[color=]ValueError
:
[color=]messagebox
.
[color=]showerror
(
[color=]"输入错误"
,
[color=]"请输入一个有效的正整数。"
)
[color=]except
[color=]Exception
[color=]as
[color=]e
:
[color=]messagebox
.
[color=]showerror
(
[color=]"错误"
,
[color=]f
[color=]"发生错误:
[color=]{
[color=]str
(
[color=]e
)
[color=]}
[color=]"
)
[color=]# 创建主窗口
[color=]root
[color=]=
[color=]tk
.
[color=]Tk
()
[color=]root
.
[color=]title
(
[color=]"微信多开软件"
)
[color=]root
.
[color=]geometry
(
[color=]"300x150"
)
[color=]root
.
[color=]resizable
(
[color=]False
,
[color=]False
)
[color=]# 标签
[color=]label
[color=]=
[color=]tk
.
[color=]Label
(
[color=]root
,
[color=]text
[color=]=
[color=]"请输入要多开的数量:"
)
[color=]label
.
[color=]pack
(
[color=]pady
[color=]=
[color=]10
)
[color=]# 输入框
[color=]entry
[color=]=
[color=]tk
.
[color=]Entry
(
[color=]root
,
[color=]justify
[color=]=
[color=]'center'
)
[color=]entry
.
[color=]pack
(
[color=]pady
[color=]=
[color=]5
)
[color=]# 多开按钮
[color=]button
[color=]=
[color=]tk
.
[color=]Button
(
[color=]root
,
[color=]text
[color=]=
[color=]"多开"
,
[color=]command
[color=]=
[color=]launch_wechat_instances
)
[color=]button
.
[color=]pack
(
[color=]pady
[color=]=
[color=]20
)
[color=]# 运行主循环
[color=]root
.
[color=]mainloop
()