Maybe someone will have a more definitive answer, but there're several points.
I don't think there's an easy way to know if an action step is enabled or not. However, there's this amazing person, xbytor, who made a huge library of different functions that he uses for his scripts. For a non-developer like me they're hard to read, but it includes a particular script: ActionFileToJavaScript.jsx, that writes an atn file to a jsx file(s), including the information about status of the steps. So if I had a task like yours,
- I'd export all actions as .atn
- convert them to .jsx with xbytor's script
using a different script I'd read this file to find what steps are marked as disabled
in which actions:
step1(); // Make
step2(); // Make
step3(); // Make
step4(false, false); // Make
step5(false, false); // Make
step6(false, false); // Make
step7(); // Make
step8(); // Make
using an AM code from ScriptListener I'd then remove all the marked steps:
var desc = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putIndex( cTID('Cmnd'), 4 ); //index of the step to remove
ref1.putName( cTID('Actn'), "Action 3" ); //name of the action
ref1.putName( cTID('ASet'), "Set 1" ); //name of the action set
desc.putReference( cTID('null'), ref1 );
executeAction( cTID('Dlt '), desc, DialogModes.NO );
or if you're a better coder than me you can just use his Actions
library to get information you need directly from an .atn file.