2 月 112022
 

之前研究easytrader主要是解决st的购买问题。发现原版的也是没有再次确认按钮。正好群里的有个大神,自己解决了这个问题,我就不要脸的找他要代码。他居然给我了。然后我测试了下。稍微改下,就正常能购买st了。

修改如下:

e88a684089b2e7c000bc7a9f4e48d14

主要就是修改pop_dialog_handler.py 文件,加个2次确认,我与原版的就是差别确认按钮文字不同:

#继续委托按钮

def _submit_by_yes(self):
    try:
        self._app.top_window()[“继续委托”].click()
    except Exception as ex:
        self._app.Window_(best_match=”Dialog”, top_level_only=True).ChildWindow(
            best_match=”继续委托”
        ).click()

def _submit_by_shortcut(self):
    self._set_foreground(self._app.top_window())
    self._app.top_window().type_keys(“%Y”, set_foreground=False)

 

 

 

def handle(self, title) -> Optional[dict]:
    if title == “委托确认”:
        self._submit_by_shortcut()
        return None

#风险提示弹框去点击继续委托按钮

    if title == “风险提示”:
        self._submit_by_yes()
        return None

 

后续还会继续研究下这个软件,因为是开源的,后续能继续更改。比实盘易好多了。实盘易虽然可以白嫖,但是无法升级,后面应该会混合使用。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny