diff --git a/main.pyw b/main.pyw index 51d635f..dd2d61f 100644 --- a/main.pyw +++ b/main.pyw @@ -3,9 +3,10 @@ """ import random import os +import subprocess from threading import Thread -__version__ = "2.0.0" # 版本 +__version__ = "2.0.1" # 版本 __author__ = "Jerry" # 作者 try: @@ -22,8 +23,13 @@ with open("name.ini", "w") as f: with open("msg_type.ini", "w") as f: f.write("normal") +def run(file): + subprocess.run("pythonw %s"%file, shell=True) + server = Thread(target=ef.start, args=("server.pyw",)) # 服务端线程 client = Thread(target=ef.start, args=("client.pyw",)) # 客户端线程 +#server = Thread(target=run, args=("server.pyw",)) +#client = Thread(target=run, args=("server.pyw",)) t = [server, client] if __name__ == "__main__": diff --git a/plugins/lib/root.py b/plugins/lib/root.py index 9c0b15a..d5e91c5 100644 --- a/plugins/lib/root.py +++ b/plugins/lib/root.py @@ -18,13 +18,9 @@ def display(text, end = "\n"): # 显示消息 text_message.insert(END, end) def send_to_server(text): # 向服务器发送信息 - with open("msg_type.ini","w") as f: - f.write("system") ef.wait(0.1) s.send(bytes(text, "utf-8")) ef.wait(0.1) - with open("msg_type.ini","w") as f: - f.write("normal") def send(): # 发送消息 send_msg = text_text.get("0.0", END)