def make_name(): """rename current item""" """TODO:replace with custom implementation that allows parameters such as name and flags ("create name anyway") to be set """ cv = ida_kernwin.get_current_viewer() if cv: hx = ida_kernwin.get_widget_type(cv) == ida_kernwin.BWN_PSEUDOCODE ida_kernwin.process_ui_action("hx:Rename" if hx else "MakeName") return
def __call__(self): if self.__idx >= len(self.__action_list): return False # Execute one action ida_kernwin.process_ui_action(self.__action_list[self.__idx], self.__flags) # Move to next action self.__idx += 1 # Reschedule return True
def __call__(self): if self.__idx >= len(self.__action_list): return False # Execute one action ida_kernwin.process_ui_action( self.__action_list[self.__idx], self.__flags) # Move to next action self.__idx += 1 # Reschedule return True
def runToUserSpace(self): #self.bookmark_view.runToUserSpace() #time.sleep(3) print('runToUser do resynch') v = ida_kernwin.get_current_viewer() r = ida_kernwin.get_view_renderer_type(v) dotoggle = False ''' work around ida bug "nrect(26)" error ''' if r == ida_kernwin.TCCRT_GRAPH: dotoggle = True ida_kernwin.process_ui_action("ToggleRenderer") print('resynch to server') simicsString = gdbProt.Evalx('SendGDBMonitor("@cgc.resynch()");') time.sleep(1) eip = gdbProt.getEIPWhenStopped() print('resynch got eip 0x%x now sig client' % eip) if dotoggle: ida_kernwin.process_ui_action("ToggleRenderer") self.signalClient()
def delayed_exec(*args): output_window_title = "Output window" tw = ida_kernwin.find_widget(output_window_title) if not tw: raise Exception("Couldn't find widget '%s'" % output_window_title) # convert from a SWiG 'TWidget*' facade, # into an object that PyQt will understand w = ida_kernwin.PluginForm.TWidgetToPyQtWidget(tw) line_edit = w.findChild(QtWidgets.QLineEdit) if not line_edit: raise Exception("Couldn't find input") line_edit.setFocus() # ensure it has focus QtWidgets.QApplication.instance().processEvents() # and that it received the focus event # inject text into widget line_edit.setText(text) # and execute the standard 'execute' action ida_kernwin.process_ui_action("cli:Execute")
def __call__(self): if self.__idx >= len(self.__action_list): return False # Execute one action aname = self.__action_list[self.__idx] print("executing: %s (flags=0x%x)" % (aname, self.__flags)) print("=> %s" % ida_kernwin.process_ui_action(aname, self.__flags)) # Move to next action self.__idx += 1 print("index=%d" % self.__idx) # Reschedule return True