示例#1
0
    def onWindowActivated(self, event):
        if self.currentTab:  #Speak current open tab
            obj = self.currentTab.child(0)
            for n in range(obj.childCount):
                if util.getDisplayedText(obj.child(n)):
                    speech.speak(util.getDisplayedText(obj.child(n)))

        default.Script.onWindowActivated(self, event)
	def onWindowActivated(self, event):
		if self.currentTab:#Speak current open tab
			obj = self.currentTab.child(0)			
			for n in range(obj.childCount):					
				if  util.getDisplayedText(obj.child(n)):				
					speech.speak(util.getDisplayedText(obj.child(n)))
		
		default.Script.onWindowActivated(self, event)
示例#3
0
    def onStateChanged(self, event):
        if event.detail1 == 1 and event.type.endswith("showing"):

            if event.source.role == rolenames.ROLE_VIEWPORT and event.source.child(
                    0
            ).role == rolenames.ROLE_TEXT:  #for text box on last page.
                speech.speak(util.getDisplayedText(event.source.child(0)))

            obj = event.source
            while not obj.role == rolenames.ROLE_FRAME:  #To read the headers and instruction labels not associated with an input widget.

                if obj.parent.role == rolenames.ROLE_PAGE_TAB and not self.currentTab == obj.parent:
                    self.currentTab = obj.parent

                    for n in range(obj.childCount):
                        if util.getDisplayedText(obj.child(n)):
                            speech.speak(util.getDisplayedText(obj.child(n)))

                    return
                else:
                    obj = obj.parent
	def onStateChanged(self, event):						
		if event.detail1 == 1 and event.type.endswith("showing"):	
			

			if event.source.role == rolenames.ROLE_VIEWPORT and event.source.child(0).role == rolenames.ROLE_TEXT:#for text box on last page.								
				speech.speak(util.getDisplayedText(event.source.child(0)))
				
				
			
			obj = event.source
			while not obj.role == rolenames.ROLE_FRAME:#To read the headers and instruction labels not associated with an input widget.
				
				if obj.parent.role == rolenames.ROLE_PAGE_TAB and not self.currentTab == obj.parent:
					self.currentTab = obj.parent
					
					for n in range(obj.childCount):					
						if  util.getDisplayedText(obj.child(n)):				
							speech.speak(util.getDisplayedText(obj.child(n)))
						
					return
				else:
					obj = obj.parent			
示例#5
0
    def onSelectionChanged(self, event):

        if event.source.name:  #for location selection.
            panel = event.source.parent

            allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)

            speech.speak(util.getDisplayedText(allLabels[6]))
            speech.speak(util.getDisplayedText(event.source))
            speech.speak(util.getDisplayedText(allLabels[3]))
            speech.speak(util.getDisplayedText(allLabels[0]))
            speech.speak(util.getDisplayedText(allLabels[5]))
            speech.speak(util.getDisplayedText(allLabels[2]))
            speech.speak(util.getDisplayedText(allLabels[4]))
            speech.speak(util.getDisplayedText(allLabels[1]))
        return
	def onSelectionChanged(self, event):		
		
		if event.source.name:#for location selection.
			panel = event.source.parent
			
			allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)
			
			speech.speak(util.getDisplayedText(allLabels[6]))
			speech.speak(util.getDisplayedText(event.source))
			speech.speak(util.getDisplayedText(allLabels[3]))
			speech.speak(util.getDisplayedText(allLabels[0]))
			speech.speak(util.getDisplayedText(allLabels[5]))
			speech.speak(util.getDisplayedText(allLabels[2]))
			speech.speak(util.getDisplayedText(allLabels[4]))
			speech.speak(util.getDisplayedText(allLabels[1]))
		return