Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xayjin/easytrader into xa…
Browse files Browse the repository at this point in the history
…yjin-master
  • Loading branch information
shidenggui committed Jun 1, 2020
2 parents 7833946 + 57a58e2 commit 1e3d2ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion easytrader/clienttrader.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ def _cancel_entrust_by_double_click(self, row):
).double_click(coords=(x, y))

def refresh(self):
self._switch_left_menus(["买入[F1]"], sleep=0.05)
# self._switch_left_menus(["买入[F1]"], sleep=0.05)
self._switch_left_menus_by_shortcut("{F5}",sleep=0.1)

@perf_clock
def _handle_pop_dialogs(self, handler_class=pop_dialog_handler.PopDialogHandler):
Expand Down
7 changes: 5 additions & 2 deletions easytrader/pop_dialog_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _set_foreground(self, grid=None):

@perf_clock
def handle(self, title):
if any(s in title for s in {"提示信息", "委托确认", "网上交易用户协议"}):
if any(s in title for s in {"提示信息", "委托确认", "网上交易用户协议", "撤单确认"}):
self._submit_by_shortcut()
return None

Expand All @@ -41,7 +41,10 @@ def _extract_content(self):
return self._app.top_window().Static.window_text()

def _extract_entrust_id(self, content):
return re.search(r"\d+", content).group()
# return re.search(r"\d+", content).group()
rule = '编号:(.*?)。'
ids=re.findall(rule,content)
return ids[0]

def _submit_by_click(self):
try:
Expand Down

0 comments on commit 1e3d2ab

Please sign in to comment.