Most of my scripts don't work now.
This script gives an error saying it needs a ')', but I have no idea where.
Maybe I'm missing it, or something has changed.
Code: Select all
Document.BeginUpdate();
var sText = Document.SelText;
if (sText == "") {
Document.SelectAll;
sText = Document.SelText;
}
for (var ii = 0; ii < sText.length; ii++;) { // starting at 1 to skip first unused
var sChar = sText[ii];
if (sChar >= '0' && sChar <= '9') {
nChar = parseInt (sChar) + 1;
if (nChar > 9) nChar = 0;
sText = sText.slice (0, ii) + nChar.toString() + sText.slice (ii+1);
}
} // for
Document.SelText = sText;
Document.EndUpdate();