(self, event)
Make record of the selected target/tag combination.
Make record of the selected target/tag combination.
Make record of the selected target / tag combination .
def on_item_activated (self, event):
        '''
        Make record of the selected target/tag combination.
        '''

        if not self.selected:
            return

        selected = self.GetPyData(self.selected)

        # module selected.
        if type(selected) == pida.module:
            pass

        # function selected.
        elif type(selected) == pida.function:
            disasm = """
            <html>
                <body text=#eeeeee bgcolor=#000000>
                <font size=4><b>%s</b></font>
                <font face=courier size=2>
            """ % (selected.name)

            for bb in selected.sorted_nodes():
                disasm += "<p>"

                # chunked block.
                if selected.ea_start > bb.ea_start > selected.ea_end:
                    disasm += "<font color=blue>CHUNKED BLOCK --------------------</font><br>"

                for ins in bb.sorted_instructions():
                    ins_disasm = ins.disasm
                    ins_disasm = re.sub("(?P<op>^j..?)\s", "<font color=yellow>\g<op> </font>", ins_disasm)
                    ins_disasm = re.sub("(?P<op>^call)\s", "<font color=red>\g<op> </font>",    ins_disasm)

                    disasm += "<font color=#999999>%08x</font>&nbsp;&nbsp;%s<br>" % (ins.ea, ins_disasm)

            disasm += "</font></body></html>"

            self.top.disassembly.SetPage(disasm)

        # basic block selected.
        elif type(selected) == pida.basic_block:
            pass
def on_item_activated ( self , event ) : if not self . selected : return selected = self . GetPyData ( self . selected ) # module selected. if type ( selected ) == pida . module : pass # function selected. elif type ( selected ) == pida . function : disasm = """
            <html>
                <body text=#eeeeee bgcolor=#000000>
                <font size=4><b>%s</b></font>
                <font face=courier size=2>
            """ % ( selected . name ) for bb in selected . sorted_nodes ( ) : disasm += "<p>" # chunked block. if selected . ea_start > bb . ea_start > selected . ea_end : disasm += "<font color=blue>CHUNKED BLOCK --------------------</font><br>" for ins in bb . sorted_instructions ( ) : ins_disasm = ins . disasm ins_disasm = re . sub ( "(?P<op>^j..?)\s" , "<font color=yellow>\g<op> </font>" , ins_disasm ) ins_disasm = re . sub ( "(?P<op>^call)\s" , "<font color=red>\g<op> </font>" , ins_disasm ) disasm += "<font color=#999999>%08x</font>&nbsp;&nbsp;%s<br>" % ( ins . ea , ins_disasm ) disasm += "</font></body></html>" self . top . disassembly . SetPage ( disasm ) # basic block selected. elif type ( selected ) == pida . basic_block : pass