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.
评论列表
文章目录