Welcome to the IDM Forum. This forum is meant as a user-to-user support mechanism where users can share knowledge and tips for all IDM software.
Since these forums are user-to-user based, IDM does not regularly read or reply to the posts in this forum. For problem reports, suggestions, or feature requests, you must email us directly. Our trained technical support staff answers most inquiries within 30 minutes.
if (UltraEdit.document.length > 0) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.perlReOn();
var nNumber = 1;
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.matchCase=true;
UltraEdit.activeDocument.findReplace.matchWord=true;
UltraEdit.activeDocument.findReplace.regExp=false;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=false;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
while (UltraEdit.activeDocument.findReplace.replace("sec","sec"+nNumber++));
}
if (UltraEdit.document.length > 0 && UltraEdit.activeDocument.isSel()) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.perlReOn();
var nNumber = 1;
var sWord = UltraEdit.activeDocument.selection;
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.matchCase=true;
UltraEdit.activeDocument.findReplace.matchWord=true;
UltraEdit.activeDocument.findReplace.regExp=false;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=false;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
while (UltraEdit.activeDocument.findReplace.replace(sWord,sWord+nNumber++));
}
if (UltraEdit.document.length > 0 && UltraEdit.activeDocument.isSel()) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.perlReOn();
var sWord = UltraEdit.activeDocument.selection;
var nNumber = UltraEdit.getValue("Enter starting number:",1);
var nEndval = UltraEdit.getValue("Enter ending number:",1);
// UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.matchCase=true;
UltraEdit.activeDocument.findReplace.matchWord=true;
UltraEdit.activeDocument.findReplace.regExp=false;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=false;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
while (nNumber <= nEndval) {
if (!UltraEdit.activeDocument.findReplace.replace(sWord,sWord+nNumber++)) break;
}
}
var g_sRomanLetters = new Array("M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I");
var g_nDecimalValues = new Array(1000,900,500,400,100,90,50,40,10,9,5,4,1);
function decimalToRomanSimple(nValue) {
var sRomanNumeral = "";
if (nValue <= 0 || nValue >= 4000) return sRomanNumeral;
for (var i = 0; i < g_sRomanLetters.length; i++) {
while (nValue >= g_nDecimalValues[i]) {
nValue -= g_nDecimalValues[i];
sRomanNumeral += g_sRomanLetters[i];
}
}
return sRomanNumeral;
}
if (UltraEdit.document.length > 0) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.ueReOn();
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=false;
UltraEdit.activeDocument.findReplace.matchWord=false;
UltraEdit.activeDocument.findReplace.regExp=true;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.searchInColumn=false;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=false;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
var nNumber = 0;
var sReplace = "";
do {
nNumber++;
sReplace = nNumber.toString() + ". ";
} while (UltraEdit.activeDocument.findReplace.replace("%[0-9]+. ",sReplace));
}if (UltraEdit.document.length > 0) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.perlReOn();
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=false;
UltraEdit.activeDocument.findReplace.matchWord=false;
UltraEdit.activeDocument.findReplace.regExp=true;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.searchInColumn=false;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.replaceAll=false;
UltraEdit.activeDocument.findReplace.replaceInAllOpen=false;
var nNumber = 0;
var sReplace = "";
do {
nNumber++;
sReplace = nNumber.toString() + ". ";
} while (UltraEdit.activeDocument.findReplace.replace("^[0-9]+\\. ",sReplace));
}do {
nNumber++;
sReplace = nNumber.toString() + ". ";
UltraEdit.activeDocument.cancelSelect();
} while (UltraEdit.activeDocument.findReplace.replace("^[0-9]+\\. ",sReplace));do {
nNumber++;
sReplace = nNumber.toString() + ". ";
UltraEdit.activeDocument.findReplace.replace("^[0-9]+\\. ",sReplace);
UltraEdit.activeDocument.key("RIGHT ARROW");
} while (UltraEdit.activeDocument.isFound());var nNumber = 1;
while (UltraEdit.activeDocument.findReplace.find("^[0-9]+\\. ")) {
UltraEdit.activeDocument.write(nNumber + ". ");
nNumber++;
}
if (UltraEdit.document.length > 0) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.ueReOn();
for (nDocIndex = 0; nDocIndex < UltraEdit.document.length; nDocIndex++) {
if (UltraEdit.document[nDocIndex].hexMode == true) continue;
UltraEdit.document[nDocIndex].top();
UltraEdit.document[nDocIndex].findReplace.mode=0;
UltraEdit.document[nDocIndex].findReplace.matchCase=false;
UltraEdit.document[nDocIndex].findReplace.matchWord=false;
UltraEdit.document[nDocIndex].findReplace.regExp=true;
UltraEdit.document[nDocIndex].findReplace.searchDown=true;
UltraEdit.document[nDocIndex].findReplace.searchInColumn=false;
UltraEdit.document[nDocIndex].findReplace.preserveCase=false;
UltraEdit.document[nDocIndex].findReplace.replaceAll=false;
UltraEdit.document[nDocIndex].findReplace.replaceInAllOpen=false;
var nNumber = 0;
var sReplace = "";
do {
nNumber++;
sReplace = nNumber.toString() + ". ";
} while (UltraEdit.document[nDocIndex].findReplace.replace("%[0-9]+. ",sReplace));
UltraEdit.document[nDocIndex].top();
}
}
Mofi wrote:I think, you copied the script code into a Unicode file which starts with a BOM (Byte Order Mark - hidden bytes at beginning of file). Javascript does not support Unicode scripts. Convert the file to ASCII with DOS line terminators. With a script file opened in UltraEdit you should see just DOS in third box in the status bar at bottom of the UltraEdit main window.