| | |
| | | return None |
| | | |
| | | |
| | | __cache_hwnd = {} |
| | | |
| | | |
| | | def get_ths_main_content_hwnd_cached(): |
| | | """ |
| | | 获取同花顺主页句柄 |
| | | :return: |
| | | """ |
| | | target_hwnd = __cache_hwnd.get("ths_main_content_hwnd") |
| | | if target_hwnd and win32_util.is_visible(target_hwnd): |
| | | return target_hwnd |
| | | target_hwnd = get_ths_main_content_hwnd() |
| | | if target_hwnd: |
| | | __cache_hwnd["ths_main_content_hwnd"] = target_hwnd |
| | | return target_hwnd |
| | | |
| | | |
| | | # 批量点击事件 |
| | | def betch_click(hwnd, ps, space_time=0.5): |
| | | for p in ps: |
| | |
| | | origin_hwnd = hwnds[0] |
| | | for w in hwnds: |
| | | title = win32_util.getText(w) |
| | | if title.find("同花顺")>=0: |
| | | if title.find("同花顺") >= 0: |
| | | origin_hwnd = w |
| | | break |
| | | input_code(origin_hwnd, num_str[:1]) |