devenv.py 文件源码

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

项目:visualStudioAddon 作者: mohammad-suliman 项目源码 文件源码
def script_reportStatusLine(self, gesture):
        #it seems that the status bar is the last child of the forground object
        #so, get it from there
        obj = api.getForegroundObject().lastChild
        found=False
        if obj and obj.role == controlTypes.ROLE_STATUSBAR:
            text = api.getStatusBarText(obj)
            api.setNavigatorObject(obj)
            found=True
        else:
            info=api.getForegroundObject().flatReviewPosition
            if info:
                info.expand(textInfos.UNIT_STORY)
                info.collapse(True)
                info.expand(textInfos.UNIT_LINE)
                text=info.text
                info.collapse()
                api.setReviewPosition(info)
                found=True
        if not found:
            # Translators: Reported when there is no status line for the current program or window.
            ui.message(_("No status line found"))
            return
        if scriptHandler.getLastScriptRepeatCount()==0:
            ui.message(text)
        else:
            speech.speakSpelling(text)
    # Translators: Input help mode message for report status line text command.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号