searchui.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:wintenApps 作者: josephsl 项目源码 文件源码
def event_nameChange(self, obj, nextHandler):
        # NVDA, can you act as a mouthpiece for Cortana?
        if isinstance(obj, UIA) and isinstance(obj.next, UIA) and obj.next.UIAElement.cachedAutomationID != "SpeechButton" and obj.name != self.cortanaResponseCache:
            element = obj.UIAElement
            # There are two Cortana response lines. Usually line 2 is more reliable.
            # However, Redstone seems to favor line 1 better.
            # A specific automation ID is used for reminders and others.
            if element.cachedAutomationID in ("SpeechContentLabel", "WeSaidTextBlock", "GreetingLine1"):
                ui.message(obj.name)
                self.cortanaResponseCache = obj.name
        nextHandler()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号