|
@@ -105,6 +105,7 @@ def smm_refresh(file_path):
|
|
|
if found_title == "":
|
|
|
print("窗口未打开")
|
|
|
return
|
|
|
+ # 如果是office的,那么就是要将file_name_ext变更为 file_name;因为office没有后缀
|
|
|
if found_title.startswith(file_name_ext) == False:
|
|
|
print("当前窗口与excel不一致,当前窗口:", found_title, ";excel:", file_name_ext)
|
|
|
return
|
|
@@ -124,9 +125,9 @@ def smm_refresh(file_path):
|
|
|
#return True
|
|
|
|
|
|
# 屏幕最大化
|
|
|
- hwnd = win32gui.GetForegroundWindow()
|
|
|
- win32gui.ShowWindow(hwnd, win32con.SW_MAXIMIZE)
|
|
|
- time.sleep(1)
|
|
|
+ #hwnd = win32gui.GetForegroundWindow()
|
|
|
+ #win32gui.ShowWindow(hwnd, win32con.SW_MAXIMIZE)
|
|
|
+ #time.sleep(1)
|
|
|
|
|
|
# 随机2-3次点击 单元格区域
|
|
|
r = random.randint(2, 3)
|