Once the throttle cables have been ruled out of the equation, the TPS will be the next culprit.
The ECU has several sensors in the injection system to feed it info on certain parameters like Temp,(ambient and engine), pressure, (barometric and manifold), crank position, You get the idea.
The ECU will work with these sensors and deliver the sparks and the fuel accordingly.
The TPS or Throttle Position Sensor is one in the equation, this little gem lets the ECU know what you are doing with the throttle and tries its best to keep up.
As some of us are finding out as we get older, it is more and more difficult to achieve what we did as things wear. As has been coorectly stated before, the TPS is for want of a better word a variable resister and when this wears it can send wrong signals to the ECU to the point that the ECU will think you have the throttle open but indeed it is closed. The rough running usually accompanying is due to the engine running rich because the ECU thinks the throttle is open, so supplying fuel for that order, then the Lambda sensor saying hang on this is too rich and telling the ECU to shut some fuel down. So you can see now there is a massive conflict going on, although switching off then on will get you home the only way forward is to change the TPS and the set it up with either TuneEcu or Tuneboy, its not just plug and play as the ECU will need a reference from the TPS for its position and voltage, sounds complicated but takes seconds to to.