Alerts for multiple Documents
Hi what i'm trying to do is Display the amount of corrections that were made in an alert. i have it set and working for one document. but when i change text on multiple documents it will not display the Amount Corrected. It will correct them but just not display a number. The part i'm having trouble with is Line 9. As indicated. If its off The Amount Of corrections in my alert will display correctly(Only for the active Document). If its On the corrections will Be done to all Documents (If my All Documents Check box is active.) but will not display a total amount of corrections for all documents. In a nut shell i'm wanting this to perform like the Find/Replace built into indesign. Display All Corrections made. If i have 10 documents with 1 correction each. I want it to display 10 if i only want to check one document i want it to display 1. Can someone help me with this?
function DBLS(target, findProps, changeProps){
var changes, numCHGS, alerts, alerts1, alert2;
app.findChangeTextOptions.caseSensitive = true;
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.properties = findProps;
app.changeGrepPreferences.properties = changeProps;
// target.changeGrep(); // This is what makes the correction work on all open Documents. If this is turned on it will not allow me to display the amount of corrections. It just shows up as 0 If this is off like now it will display The amount of Correction (Only on active Page)
changes = app.documents[0].changeGrep();
numCHGS = changes.length;
alerts = [numCHGS+" Double Space", SP+" Space Period", SC+" Space Colon", DR+" Double Return"];
alerts1 = [ENG+" Important Statement and MSDS"];
alerts2 = [CCH+" Pink ? to A Contains", CE+" Pink ? to E Contains", CK+" Pink ? to K Contains", spCOM+" Space Comma"];
alert("Corrections Made:\r"+alerts.join("\r")+"\r-----------------------------------\rImportant and SDS:\r-----------------------------------\r"+alerts1.join("\r")+"\r-----------------------------------\rCONTAINS:\r-----------------------------------\r"+alerts2.join("\r"));
}
