-
Notifications
You must be signed in to change notification settings - Fork 0
/
fastclear.py
44 lines (33 loc) · 1.03 KB
/
fastclear.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import idaapi
class MyHandler(idaapi.action_handler_t):
def __init__(self):
idaapi.action_handler_t.__init__(self)
def activate(self, ctx):
idaapi.msg_clear()
return 0
def update(self, ctx):
return idaapi.AST_ENABLE_ALWAYS
if idaapi.get_action_shortcut("Quit") == "Alt-X":
idaapi.update_action_shortcut("Quit", None)
action_desc = idaapi.action_desc_t(
'fast:clear', # The action name. This acts like an ID and must be unique
'Quickly clears output window', # The action text.
MyHandler(), # The action handler.
'Alt+X', # Optional: the action shortcut
'Clear output window', # Optional: the action tooltip (available in menus/toolbar)
199) # Optional: the action icon (shows when in menus/toolbars)
idaapi.register_action(action_desc)
class FastclearPlugin(idaapi.plugin_t):
flags = 0
wanted_name = "fastclear"
comment = ""
help = ""
wanted_hotkey = ""
def init(self):
return idaapi.PLUGIN_SKIP
def run(self, arg):
return
def term(self):
return
def PLUGIN_ENTRY():
return FastclearPlugin()