无命令行中止MAA进程
This commit is contained in:
21
AUTO_MAA.py
21
AUTO_MAA.py
@@ -220,7 +220,12 @@ class MaaRunner(QtCore.QThread):
|
|||||||
"\n".join([self.data[_][0] for _ in error_index]),
|
"\n".join([self.data[_][0] for _ in error_index]),
|
||||||
result,
|
result,
|
||||||
)
|
)
|
||||||
os.system("taskkill /F /T /PID " + str(maa.pid))
|
killprocess = subprocess.Popen(
|
||||||
|
"taskkill /F /T /PID " + str(maa.pid),
|
||||||
|
shell=True,
|
||||||
|
creationflags=subprocess.CREATE_NO_WINDOW,
|
||||||
|
)
|
||||||
|
killprocess.wait()
|
||||||
self.push_notification.emit(
|
self.push_notification.emit(
|
||||||
"用户日常代理出现异常!",
|
"用户日常代理出现异常!",
|
||||||
"用户 "
|
"用户 "
|
||||||
@@ -322,7 +327,12 @@ class MaaRunner(QtCore.QThread):
|
|||||||
"\n".join([self.data[_][0] for _ in error_index]),
|
"\n".join([self.data[_][0] for _ in error_index]),
|
||||||
result,
|
result,
|
||||||
)
|
)
|
||||||
os.system("taskkill /F /T /PID " + str(maa.pid))
|
killprocess = subprocess.Popen(
|
||||||
|
"taskkill /F /T /PID " + str(maa.pid),
|
||||||
|
shell=True,
|
||||||
|
creationflags=subprocess.CREATE_NO_WINDOW,
|
||||||
|
)
|
||||||
|
killprocess.wait()
|
||||||
if_strat_app = True
|
if_strat_app = True
|
||||||
if self.if_run:
|
if self.if_run:
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
@@ -387,7 +397,12 @@ class MaaRunner(QtCore.QThread):
|
|||||||
if self.mode in ["日常代理", "人工排查"]:
|
if self.mode in ["日常代理", "人工排查"]:
|
||||||
# 关闭可能未正常退出的MAA进程
|
# 关闭可能未正常退出的MAA进程
|
||||||
if not self.if_run:
|
if not self.if_run:
|
||||||
os.system("taskkill /F /T /PID " + str(maa.pid))
|
killprocess = subprocess.Popen(
|
||||||
|
"taskkill /F /T /PID " + str(maa.pid),
|
||||||
|
shell=True,
|
||||||
|
creationflags=subprocess.CREATE_NO_WINDOW,
|
||||||
|
)
|
||||||
|
killprocess.wait()
|
||||||
# 更新用户数据
|
# 更新用户数据
|
||||||
modes = [self.data[_][15] for _ in all_index]
|
modes = [self.data[_][15] for _ in all_index]
|
||||||
uids = [self.data[_][16] for _ in all_index]
|
uids = [self.data[_][16] for _ in all_index]
|
||||||
|
|||||||
Reference in New Issue
Block a user