瀏覽代碼

多个进程位置

pcacc 8 月之前
父節點
當前提交
5a6d479c26
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      yys_task.py

+ 6 - 1
yys_task.py

@@ -143,7 +143,12 @@ def task_close_game():
 
 
 def task_start_game():
 def task_start_game():
     isSuccess = False
     isSuccess = False
-    subprocess.Popen(R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuPlayer.exe')
+    path1 = R'C:\\Program Files\\Netease\\MuMuPlayer-12.0\\shell\\MuMuPlayer.exe'
+    path2 = R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuPlayer.exe'
+    if os.path.exists(path1):
+        subprocess.Popen(path1)
+    elif os.path.exists(path2):
+        subprocess.Popen(path2)
     if waitClickImg_withBool(gameStart_img.ico, 100, 20) == False:
     if waitClickImg_withBool(gameStart_img.ico, 100, 20) == False:
         return False
         return False
     waitFindImg_withBool(gameStart_img.gameIn, 100, 10)
     waitFindImg_withBool(gameStart_img.gameIn, 100, 10)