electronic spark modulator bad.
try to get a new ignition rotor
I have replaced the coil and distributor cap.
Is it a brand new distributor ? If not then replace the module and pick-up coil in the distributor that you have.
The most common failure associated with those symptoms is the Crankshaft Position Sensor.
If the coil is producing a spark then the HT lead between them is breaking down.
If you're not getting spark from the distributor, see if you're getting spark from the ignition coil. If there's no spark there, then the coil is either bad, or it's not wired up correctly.
try replacing the coil.
No input voltage to the coil or the coil is bad. Check the distributor for issues and the wires.
== == check that you are getting power to the distributor. i am assuming you are talking about a earlier model vehicle Have you checked the ecm relay? maybe the pickup coil assy.
Even though you replaced the coil, it may be bad. You should test that first. If the coil is okay, it could be that the ignition wires need to be replaced.
Bad coil? Bad distributor rotor? Bad distributor cap?
Check the hot wire coming from the distributor and coil to make sure it is not going to ground