You found out the hard way that you should teach the computer how to idle after disconnecting the battery. Okay, you'll have to disconnect the battery for at least five minutes to kill the Keep-Alive Memory. You might wanna leave a door open just to be sure all the electical energy is drained. Then follow these steps:
-- electrically disconnect the IAB valve
-- put the battery cable back on
-- start your engine, then using a couple of hat pins, a DVOM, and the idle stop screw, adjust the screw until you get 0.95-0.995v across the TPS (that's the green and black wires, I believe).
-- turn off motor and reconnect the IAB valve
-- restart and idle with NO ACCESSORIES ON for about 3 minutes
-- shut down for another 5 minutes
-- restart and turn on every accessory on full blast. For an added smoothness to idle quality, I even have it in gear. This is only if you have an automatic, though.
-- shut it down
Problem should be solved. If not, let us know.
------------------
Capri306, Moderator, The Mustang Works Online
1979 Mercury Capri, 5.0L -- C4 -- 2.73
1987 Mustang LX Notch