mirror of
https://github.com/cemu-project/idapython.git
synced 2025-02-17 18:36:23 +01:00
Alt-7 uses runscript() to run scripts
This commit is contained in:
parent
5ec97ef3aa
commit
e1298031ac
13
python.cpp
13
python.cpp
@ -344,18 +344,7 @@ void IDAPython_ScriptBox(void)
|
||||
|
||||
pystr = PyObject_CallMethod(scriptbox, "run", "");
|
||||
|
||||
if (pystr)
|
||||
{
|
||||
/* If the return value is string use it as path */
|
||||
if (PyObject_TypeCheck(pystr, &PyString_Type))
|
||||
{
|
||||
begin_execution();
|
||||
ExecFile(PyString_AsString(pystr));
|
||||
end_execution();
|
||||
}
|
||||
Py_DECREF(pystr);
|
||||
}
|
||||
else
|
||||
if (!pystr)
|
||||
{
|
||||
/* Print the exception info */
|
||||
if (PyErr_Occurred())
|
||||
|
@ -143,9 +143,7 @@ class ScriptBox(Choose):
|
||||
n = self.choose()
|
||||
|
||||
if n > 0:
|
||||
return self.list[n-1]
|
||||
else:
|
||||
return None
|
||||
runscript(self.list[n-1])
|
||||
|
||||
def addscript(self, scriptpath):
|
||||
self.list.append(scriptpath)
|
||||
|
Loading…
x
Reference in New Issue
Block a user