mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 03:54: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!" |