mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-01 05:24:18 +01:00
18 lines
337 B
Python
18 lines
337 B
Python
|
import idaapi
|
||
|
|
||
|
def cb(*args):
|
||
|
print "Callback called!"
|
||
|
return 1
|
||
|
|
||
|
try:
|
||
|
if ctx:
|
||
|
idaapi.del_menu_item(ctx)
|
||
|
except:
|
||
|
pass
|
||
|
|
||
|
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!"
|