计算距离的bug修改
This commit is contained in:
1 parent
9209b9879c
commit
8e836e10af
1 file changed
+6
-2
@@ -1,6 +1,10 @@
|
|||||||
import win32gui, win32con, time, os, sys
|
import win32gui, win32con, time, os, sys
|
||||||
import pyautogui as ag
|
import pyautogui as ag
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
import platform
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
sys.path.append('e:\\libs\\')
|
||||||
|
else:
|
||||||
|
sys.path.append('/data/deploy/make3d/make2/libs/')
|
||||||
import config, libs
|
import config, libs
|
||||||
|
|
||||||
def find_and_maximize_window(window_title):
|
def find_and_maximize_window(window_title):
|
||||||
@@ -13,7 +17,7 @@ def find_and_maximize_window(window_title):
|
|||||||
print(f'found {window_title} hwnd:{hwnd}')
|
print(f'found {window_title} hwnd:{hwnd}')
|
||||||
# win32gui.ShowWindow(hwnd, win32con.SW_MAXIMIZE)
|
# win32gui.ShowWindow(hwnd, win32con.SW_MAXIMIZE)
|
||||||
win32gui.SetForegroundWindow(hwnd)
|
win32gui.SetForegroundWindow(hwnd)
|
||||||
pid = win32gui.GetWindowText(hwnd).split('wait')[0].split(' ')[0].split('-')[0].split('*')[0]
|
pid = win32gui.GetWindowText(hwnd).split('wait')[0].split(' ')[0].split('-')[0].split('*')[0].split('_')[0]
|
||||||
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
|
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
|
||||||
return pid, left, top, right, bottom
|
return pid, left, top, right, bottom
|
||||||
return '0', 0, 0, 0, 0
|
return '0', 0, 0, 0, 0
|
||||||
|
|||||||
Reference in new issue
Block a user