def IdxChooser(self): #'i' #THE ONLY place can change the index manually
DEBUG_PRINT('in IdxChooser')
ea = idc.ScreenEA()
deflt_id = 1
try:
deflt_id = self.GetID(ea, self.GetIDX(ea)) + 1
except:
pass
DEBUG_PRINT(ea)
if ea not in self._dbDict.keys():
DEBUG_PRINT( '\n0x%x has no comments'%(ea))
return
title = 'IndexChooser'
cols = [['ID',4],['Index',10],['Comment',40]]
items = []
count = 1
for item in self._dbDict[ea]._idx_list:
temp = [str(count),str(item[0]),item[1]]
items.append(temp)
count = count + 1
chooser = IdxChoose2(title, cols, items,deflt = deflt_id)
id = chooser.show()
if -1==id:
idc.Message('\n Index no change\n')
else:
self._choose_id = id
self._choose_ea = ea
print '0x%x %dth index is chosen'%(ea,self._choose_id)
self.ForwardView(ea,self._choose_id,innermode = 1)
评论列表
文章目录