|
分享源码
界面截图: |
|
是否带模块: |
纯源码 |
备注说明: |
- |
Python源码
import os
import subprocess
import tkinter as tk
from tkinter import messagebox
def launch_wechat_instances():
try:
# 获取用户输入的多开数量
count = int(entry.get())
if count < 1:
raise ValueError
# VX安装目录
wechat_path = r"E:\WeChat\WeChat.exe" # 请确保路径正确
if not os.path.exists(wechat_path):
messagebox.showerror("错误", f"未找到VX可执行文件:{wechat_path}")
return
for i in range(count):
# 启动VX实例
subprocess.Popen([wechat_path])
messagebox.showinfo("成功", f"已成功启动 {count} 个VX实例。")
except ValueError:
messagebox.showerror("输入错误", "请输入一个有效的正整数。")
except Exception as e:
messagebox.showerror("错误", f"发生错误:{str(e)}")
# 创建主窗口
root = tk.Tk()
root.title("VX多开软件")
root.geometry("300x150")
root.resizable(False, False)
# 标签
label = tk.Label(root, text="请输入要多开的数量:")
label.pack(pady=10)
# 输入框
entry = tk.Entry(root, justify='center')
entry.pack(pady=5)
# 多开按钮
button = tk.Button(root, text="多开", command=launch_wechat_instances)
button.pack(pady=20)
# 运行主循环
root.mainloop()
|
|