Javascript syntax error
Hi,
There is an issue with my javascript but having trouble identifying it. The script is supposed to find and highlight words I want to react, but must skip over anything that is already marked with overlaytext.
This is what I have done so far ...
- Using the "Actions" feature in Adobe I use the "Search & Remove" dialog to search for words I want to redact.
- I then run the below JavaScript to highlight the words found in yellow
var colHilite = ["CMYK",0,0, 1, 0]; // yellow
var oDoc = event.target;
var aAnnts = oDoc.getAnnots({sortBy:"Author"});
for(var i=0;i<aAnnts.length;i++)
{
if (aAnnts.type == "Redact") {
if ((overlayText != "Overlay1") || (overlayText != "Overlay2")); // This line seems to be causing issues, Skip highlight over words that have been marked with overlay
}
{
aAnnts.type = "Highlight";
aAnnts.strokeColor = colHilite;
}
}
Thanks in advance for your help !
