mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-24 10:09:20 +01:00
109158fabb
- Added AskUsingForm() with embedded forms support (check ex_askusingform.py example and formchooser.py in the SDK) - Added idautils.DecodePreviousInstruction() / DecodePrecedingInstruction() - Added idc.BeginTypeUpdating() / EndTypeUpdating() for fast batch type update operations - Added more IDP callbacks - Added UI_Hooks with a few notification events - Added idaapi.process_ui_action() / idc.ProcessUiAction() - Added netnode.index() to get netnode number - Better handling of ea_t values with bitwise negation - Execute statement hotkey (Ctrl-F3), script timeout, and other options are now configurable with Python.cfg - bugfix: idaapi.msg() / error() and warning() so they don't accept vararg - bugfix: processor_t.id constants were incorrect - bugfix: get_debug_names() was broken with IDA64 - Various bugfixes
18 lines
407 B
Python
18 lines
407 B
Python
import idaapi
|
|
|
|
def cb(*args):
|
|
print("Callback called!")
|
|
return 1
|
|
|
|
try:
|
|
ctx
|
|
idaapi.del_menu_item(ctx)
|
|
print("Menu removed")
|
|
del ctx
|
|
except:
|
|
ctx = idaapi.add_menu_item("Search/", "X", "", 0, cb, tuple("hello world"))
|
|
if ctx is None:
|
|
print("Failed to add menu!")
|
|
del ctx
|
|
else:
|
|
print("Menu added successfully. Run the script again to delete the menu") |