def activate(self, ctx): for idx in ctx.chooser_selection: if self.use_get_chooser_data: _, _, _, s = ida_kernwin.get_chooser_data( ctx.widget_title, idx) else: si = ida_strlist.string_info_t() if ida_strlist.get_strlist_item(si, idx): s = ida_bytes.get_strlit_contents(si.ea, si.length, si.type) print("Selected string (retrieved using %s) at index %d: \"%s\"" % ("get_chooser_data()" if self.use_get_chooser_data else "get_strlist_item()", idx, s)) return 0
def _get_item(self, index): if not ida_strlist.get_strlist_item(self._si, index): return None return Strings.StringItem(self._si)