mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-26 09:41:55 +01:00
ScriptBox_instance renamed to scriptbox
This commit is contained in:
parent
48301d9703
commit
f703a5fb3c
@ -221,7 +221,7 @@ void IDAPython_ScriptBox(void)
|
|||||||
module = PyImport_AddModule("__main__");
|
module = PyImport_AddModule("__main__");
|
||||||
dict = PyModule_GetDict(module);
|
dict = PyModule_GetDict(module);
|
||||||
|
|
||||||
scriptbox = PyDict_GetItemString(dict, "ScriptBox_instance");
|
scriptbox = PyDict_GetItemString(dict, "scriptbox");
|
||||||
|
|
||||||
if (!scriptbox)
|
if (!scriptbox)
|
||||||
{
|
{
|
||||||
|
@ -42,8 +42,8 @@ def addscriptpath(script):
|
|||||||
sys.path.append(scriptpath)
|
sys.path.append(scriptpath)
|
||||||
|
|
||||||
# Add the script to ScriptBox if it's not there yet
|
# Add the script to ScriptBox if it's not there yet
|
||||||
if not script in ScriptBox_instance.list:
|
if not script in scriptbox.list:
|
||||||
ScriptBox_instance.list.insert(0, script)
|
scriptbox.list.insert(0, script)
|
||||||
|
|
||||||
|
|
||||||
def runscript(script):
|
def runscript(script):
|
||||||
@ -138,7 +138,7 @@ class ScriptBox(Choose):
|
|||||||
def addscript(self, scriptpath):
|
def addscript(self, scriptpath):
|
||||||
self.list.append(scriptpath)
|
self.list.append(scriptpath)
|
||||||
|
|
||||||
ScriptBox_instance = ScriptBox()
|
scriptbox = ScriptBox()
|
||||||
|
|
||||||
#-------------------------------------------------------------
|
#-------------------------------------------------------------
|
||||||
# Watchdog to catch runaway scripts after a specified timeout
|
# Watchdog to catch runaway scripts after a specified timeout
|
||||||
@ -202,7 +202,6 @@ userrc = get_user_idadir() + os.sep + "idapythonrc.py"
|
|||||||
if os.path.exists(userrc):
|
if os.path.exists(userrc):
|
||||||
runscript(userrc)
|
runscript(userrc)
|
||||||
# Remove the user script from the history
|
# Remove the user script from the history
|
||||||
del ScriptBox_instance.list[0]
|
del scriptbox.list[0]
|
||||||
|
|
||||||
|
|
||||||
# All done, ready to rock.
|
# All done, ready to rock.
|
||||||
|
Loading…
Reference in New Issue
Block a user