skypeapp.py 文件源码

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

项目:wintenApps 作者: josephsl 项目源码 文件源码
def event_nameChange(self, obj, nextHandler):
        # In recent versions, live region change event is used instead, so don't announce messages with this method.
        if isinstance(obj, UIA):
            uiElement = obj.UIAElement
            if uiElement.cachedClassName == "TextBlock" and obj.next is not None:
                # Announce typing indicator (same as Skype for Desktop).
                nextElement = obj.next.UIAElement
                # Make sure to catch all possible UI placement changes between Skype UWP releases.
                if nextElement.cachedAutomationID in ("ChatEditBox", "ChatTranslationSettings"):
                    # Translators: Presented when someone stops typing in Skype app (same as Skype for Desktop).
                    ui.message(obj.name if obj.name != "" else _("Typing stopped"))
        nextHandler()

    # The live region changed event for messages has no automation ID whatsoever.
    # Unfortunately, Skype message fires name change, so be sure to perform one or the other.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号