mirror of
https://github.com/cemu-project/idapython.git
synced 2025-02-21 12:07:13 +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", "");
|
pystr = PyObject_CallMethod(scriptbox, "run", "");
|
||||||
|
|
||||||
if (pystr)
|
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
|
|
||||||
{
|
{
|
||||||
/* Print the exception info */
|
/* Print the exception info */
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
|
@ -143,9 +143,7 @@ class ScriptBox(Choose):
|
|||||||
n = self.choose()
|
n = self.choose()
|
||||||
|
|
||||||
if n > 0:
|
if n > 0:
|
||||||
return self.list[n-1]
|
runscript(self.list[n-1])
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def addscript(self, scriptpath):
|
def addscript(self, scriptpath):
|
||||||
self.list.append(scriptpath)
|
self.list.append(scriptpath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user