程序优化
This commit is contained in:
1 parent
2093ff5526
commit
10640a63c2
8 files changed
+260
-44
No files matched your search
+11
-1
@@ -5,7 +5,7 @@ if platform.system() == 'Windows':
|
||||
sys.path.append('e:\\libs\\')
|
||||
else:
|
||||
sys.path.append('/data/deploy/make3d/make2/libs/')
|
||||
import config, libs,libs_db
|
||||
import config, libs,libs_db,common
|
||||
redisLocal = config.redis_local
|
||||
def find_and_maximize_window(window_title):
|
||||
windows = []
|
||||
@@ -23,6 +23,16 @@ def find_and_maximize_window(window_title):
|
||||
print(f'found {window_title} hwnd:{hwnd}')
|
||||
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
|
||||
return pid, left, top, right, bottom
|
||||
|
||||
if "screen" in win32gui.GetWindowText(hwnd):
|
||||
pid = win32gui.GetWindowText(hwnd).split('screen')[0].split(' ')[0].split('-')[0].split('*')[0].split('_')[0]
|
||||
time.sleep(3)
|
||||
#截屏
|
||||
if pid != "":
|
||||
common.saveScreenImg(pid)
|
||||
time.sleep(3)
|
||||
ag.hotkey('alt', 'f4')
|
||||
|
||||
return '0', 0, 0, 0, 0
|
||||
|
||||
# def get_defineDistances(pid, left, top, right, bottom):
|
||||
|
||||
Reference in new issue
Block a user