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;
var sNumber = "1";
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=true;
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;
while (UltraEdit.activeDocument.findReplace.replace("A\\d+","A"+sNumber)) {
UltraEdit.activeDocument.findReplace.replace("B\\d+","B"+sNumber);
UltraEdit.activeDocument.findReplace.replace("C\\d+","C"+sNumber);
UltraEdit.activeDocument.findReplace.replace("D\\d+","D"+sNumber);
UltraEdit.activeDocument.findReplace.replace("E\\d+","E"+sNumber);
UltraEdit.activeDocument.findReplace.replace("F\\d+","F"+sNumber);
nNumber++;
sNumber = nNumber.toString();
}
}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=true;
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;
do {
nNumber++;
var sNumber = nNumber.toString();
var sReplace = "^1"+sNumber+"^2"+sNumber+"^3"+sNumber+"^4"+sNumber+"^5"+sNumber+"^6"+sNumber;
}
while (UltraEdit.activeDocument.findReplace.replace("%^([~0-9]+^)[0-9]+^([~0-9]+^)[0-9]+^([~0-9]+^)[0-9]+^([~0-9]+^)[0-9]+^([~0-9]+^)[0-9]+^([~0-9]+^)[0-9]+",sReplace));
}
if (UltraEdit.document.length > 0) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
UltraEdit.perlReOn();
// Footnotes/endnotes to start with this number: (insert here!)
var nNumber = 1;
sNumber = nNumber.toString();
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=true;
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.replaceInAllOpen=false;
UltraEdit.activeDocument.findReplace.replaceAll=true;
UltraEdit.activeDocument.findReplace.replace("<<","~A1~B1~C1~D1~E1~F1~G");
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.replaceAll=false;
while (UltraEdit.activeDocument.findReplace.replace("~A\\d+","~A"+sNumber)) {
UltraEdit.activeDocument.findReplace.replace("~B\\d+","~B"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~C\\d+","~C"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~D\\d+","~D"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~E\\d+","~E"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~F\\d+","~F"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~G\\d+","~G"+sNumber);
nNumber++;
sNumber = nNumber.toString();
}
UltraEdit.activeDocument.findReplace.replaceAll=true;
UltraEdit.activeDocument.top();
// ALL HTML '"' MUST BE QUOTED OUT!!!!
// fn-snippet A: <a NAME="BACK_
// fn-snippet B: \"></a><a href=\"fvg_hbhm_fn.html#endnote_
// fn-snippet C: \"><sup>[
// fn-snippet D: ]</sup></a>!<a NAME=\"endnote_
// fn-snippet E: \"><p><a HREF=\"fvg_hbhm_text1.html#BACK_
// fn-snippet F: \">[
// fn-snippet G: ]</a>
UltraEdit.activeDocument.findReplace.replace("~A","<a NAME=\"BACK_");
UltraEdit.activeDocument.findReplace.replace("~B","\"></a><a href=\"fvg_hbhm_fn.html#endnote_");
UltraEdit.activeDocument.findReplace.replace("~C","\"><sup>[");
UltraEdit.activeDocument.findReplace.replace("~D","]</sup></a>!<a NAME=\"endnote_");
UltraEdit.activeDocument.findReplace.replace("~E","\"><p><a HREF=\"fvg_hbhm_text1.html#BACK_");
UltraEdit.activeDocument.findReplace.replace("~F","\">[");
UltraEdit.activeDocument.findReplace.replace("~G","]</a>");
// todo: 1) copy file to 'file.tmp'
// 2) find the fn's in FILE.TMP
// 3) delete the fn's in current file.
// 4) insert output file content at end of current file.
}this is text this is text this is text<<endnote endnote endnote>>
this is text this is text this is text this is text this is text
this is<<endnote endnote endnote>> text this is text this is text
this is text<<endnote endnote endnote>> this is text this is text
this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text<<endnote endnote
endnote>> this is text this is text this is text this is text this is text this is<<endnote endnote endnote>> text this is text this is text this is text<<endnote
endnote endnote>> this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text
this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<a NAME="BACK_1"></a><a href="fvg_hbhm_fn.html#endnote_1"><sup>[1]</sup></a>!<a NAME="endnote_1"><p><a HREF="fvg_hbhm_text1.html#BACK_1">[1]</a>endnote endnote endnote>>
this is text this is text this is text this is text this is text
this is<a NAME="BACK_2"></a><a href="fvg_hbhm_fn.html#endnote_2"><sup>[2]</sup></a>!<a NAME="endnote_2"><p><a HREF="fvg_hbhm_text1.html#BACK_2">[2]</a>endnote endnote endnote>> text this is text this is text
this is text<a NAME="BACK_3"></a><a href="fvg_hbhm_fn.html#endnote_3"><sup>[3]</sup></a>!<a NAME="endnote_3"><p><a HREF="fvg_hbhm_text1.html#BACK_3">[3]</a>endnote endnote endnote>> this is text this is text
this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text<a NAME="BACK_4"></a><a href="fvg_hbhm_fn.html#endnote_4"><sup>[4]</sup></a>!<a NAME="endnote_4"><p><a HREF="fvg_hbhm_text1.html#BACK_4">[4]</a>endnote endnote
endnote>> this is text this is text this is text this is text this is text this is<a NAME="BACK_5"></a><a href="fvg_hbhm_fn.html#endnote_5"><sup>[5]</sup></a>!<a NAME="endnote_5"><p><a HREF="fvg_hbhm_text1.html#BACK_5">[5]</a>endnote endnote endnote>> text this is text this is text this is text<a NAME="BACK_6"></a><a href="fvg_hbhm_fn.html#endnote_6"><sup>[6]</sup></a>!<a NAME="endnote_6"><p><a HREF="fvg_hbhm_text1.html#BACK_6">[6]</a>endnote
endnote endnote>> this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text
this is text this is text this is text this is text<a NAME="BACK_7"></a><a href="fvg_hbhm_fn.html#endnote_7"><sup>[7]</sup></a>!<a NAME="endnote_7"><p><a HREF="fvg_hbhm_text1.html#BACK_7">[7]</a>endnote endnote endnote>> this is text this is text this is text this is text<a NAME="BACK_8"></a><a href="fvg_hbhm_fn.html#endnote_8"><sup>[8]</sup></a>!<a NAME="endnote_8"><p><a HREF="fvg_hbhm_text1.html#BACK_8">[8]</a>endnote endnote endnote>> this is text this is text this is text this is text<a NAME="BACK_9"></a><a href="fvg_hbhm_fn.html#endnote_9"><sup>[9]</sup></a>!<a NAME="endnote_9"><p><a HREF="fvg_hbhm_text1.html#BACK_9">[9]</a>endnote endnote endnote>> this is text this is text this is text this is text<a NAME="BACK_10"></a><a href="fvg_hbhm_fn.html#endnote_10"><sup>[10]</sup></a>!<a NAME="endnote_10"><p><a HREF="fvg_hbhm_text1.html#BACK_10">[10]</a>endnote endnote endnote>> this is text UltraEdit.activeDocument.findReplace.replace("!<a NAME=\"endnote[ !$A-Z0-9._%+-]+>>","XXXX");UltraEdit.activeDocument.findReplace.replace("!<a NAME=\"!<a NAME=\"endnote_.*\>\>","XXXX");// Use user clipboard 9 instead of Windows clipboard.
// This version should be used if Unicode characters are matched too.
UltraEdit.selectClipboard(9);
UltraEdit.clearClipboard();
UltraEdit.activeDocument.top();
while(UltraEdit.activeDocument.findReplace.find("...whatever...")) {
UltraEdit.activeDocument.copyAppend();
UltraEdit.clipboardContent += "\r\n";
}
UltraEdit.activeDocument.bottom();
UltraEdit.activeDocument.paste();
UltraEdit.clearClipboard();
UltraEdit.selectClipboard(0); UltraEdit.clipboardContent += UltraEdit.activeDocument.selection;var sFoundStrings = "";
UltraEdit.activeDocument.top();
while(UltraEdit.activeDocument.findReplace.find("...whatever...")) {
sFoundStrings += UltraEdit.activeDocument.selection;
sFoundStrings += "\r\n";
}
UltraEdit.activeDocument.write(sFoundStrings);
this is text this is text this is text<<endnote endnote endnote>>
this is text this is text this is text this is text this is text
this is<<endnote endnote endnote>> text this is text this is text
this is text<<endnote endnote endnote>> this is text this is text
this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text<<endnote endnote <CR>
endnote>> this is text this is text this is text this is text this is text this is<<endnote endnote endnote>> text this is text this is text this is text<<endnote <CR>
endnote endnote>> this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text
this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<<endnote endnote endnote>> this is text this is text this is text this is text<<endnote endnote endnote>> this is textthis is text this is text this is text<a NAME="BACK_1"></a><a href="fvg_hbhm_fn.html#endnote_1"><sup>[1]</sup></a>
this is text this is text this is text this is text this is text
this is<a NAME="BACK_2"></a><a href="fvg_hbhm_fn.html#endnote_2"><sup>[2]</sup></a> text this is text this is text
this is text<a NAME="BACK_3"></a><a href="fvg_hbhm_fn.html#endnote_3"><sup>[3]</sup></a> this is text this is text
this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text<a NAME="BACK_4"></a><a href="fvg_hbhm_fn.html#endnote_4"><sup>[4]</sup></a> this is text this is text this is text this is text this is text this is<a NAME="BACK_5"></a><a href="fvg_hbhm_fn.html#endnote_5"><sup>[5]</sup></a> text this is text this is text this is text<a NAME="BACK_6"></a><a href="fvg_hbhm_fn.html#endnote_6"><sup>[6]</sup></a> this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text
this is text this is text this is text this is text<a NAME="BACK_7"></a><a href="fvg_hbhm_fn.html#endnote_7"><sup>[7]</sup></a> this is text this is text this is text this is text<a NAME="BACK_8"></a><a href="fvg_hbhm_fn.html#endnote_8"><sup>[8]</sup></a> this is text this is text this is text this is text<a NAME="BACK_9"></a><a href="fvg_hbhm_fn.html#endnote_9"><sup>[9]</sup></a> this is text this is text this is text this is text<a NAME="BACK_10"></a><a href="fvg_hbhm_fn.html#endnote_10"><sup>[10]</sup></a> this is text <a NAME="endnote_1"><p><a HREF="fvg_hbhm_text1.html#BACK_1">[1]</a>endnote endnote endnote
<a NAME="endnote_2"><p><a HREF="fvg_hbhm_text1.html#BACK_2">[2]</a>endnote endnote endnote
<a NAME="endnote_3"><p><a HREF="fvg_hbhm_text1.html#BACK_3">[3]</a>endnote endnote endnote
<a NAME="endnote_4"><p><a HREF="fvg_hbhm_text1.html#BACK_4">[4]</a>endnote endnote <CR>
endnote
<a NAME="endnote_5"><p><a HREF="fvg_hbhm_text1.html#BACK_5">[5]</a>endnote endnote endnote
<a NAME="endnote_6"><p><a HREF="fvg_hbhm_text1.html#BACK_6">[6]</a>endnote <CR>
endnote endnote
<a NAME="endnote_7"><p><a HREF="fvg_hbhm_text1.html#BACK_7">[7]</a>endnote endnote endnote
<a NAME="endnote_8"><p><a HREF="fvg_hbhm_text1.html#BACK_8">[8]</a>endnote endnote endnote
<a NAME="endnote_9"><p><a HREF="fvg_hbhm_text1.html#BACK_9">[9]</a>endnote endnote endnote
<a NAME="endnote_10"><p><a HREF="fvg_hbhm_text1.html#BACK_10">[10]</a>endnote endnote endnotethis is text this is text this is text<a href="#endnote_1" name="BACK_1"><sup>[1]</sup></a>
this is text this is text this is text this is text this is text
this is<a href="#endnote_2" name="BACK_2"><sup>[2]</sup></a> text this is text this is text
this is text<a href="#endnote_3" name="BACK_3"><sup>[3]</sup></a> this is text this is text
this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text<a href="#endnote_4" name="BACK_4"><sup>[4]</sup></a> this is text this is text this is text this is text this is text this is<a href="#endnote_5" name="BACK_5"><sup>[5]</sup></a> text this is text this is text this is text<a href="#endnote_6" name="BACK_6"><sup>[6]</sup></a> this is text this is text this is text this is text this is text this is text this is text this is text this is text this is text
this is text this is text this is text this is text<a href="#endnote_7" name="BACK_7"><sup>[7]</sup></a> this is text this is text this is text this is text<a href="#endnote_8" name="BACK_8"><sup>[8]</sup></a> this is text this is text this is text this is text<a href="#endnote_9" name="BACK_9"><sup>[9]</sup></a> this is text this is text this is text this is text<a href="#endnote_10" name="BACK_10"><sup>[10]</sup></a> this is text
<p><a href="#BACK_1" name="endnote_1">[1]</a>endnote endnote endnote</p>
<p><a href="#BACK_2" name="endnote_2">[2]</a>endnote endnote endnote</p>
<p><a href="#BACK_3" name="endnote_3">[3]</a>endnote endnote endnote</p>
<p><a href="#BACK_4" name="endnote_4">[4]</a>endnote endnote <CR>
endnote</p>
<p><a href="#BACK_5" name="endnote_5">[5]</a>endnote endnote endnote</p>
<p><a href="#BACK_6" name="endnote_6">[6]</a>endnote <CR>
endnote endnote</p>
<p><a href="#BACK_7" name="endnote_7">[7]</a>endnote endnote endnote</p>
<p><a href="#BACK_8" name="endnote_8">[8]</a>endnote endnote endnote</p>
<p><a href="#BACK_9" name="endnote_9">[9]</a>endnote endnote endnote</p>
<p><a href="#BACK_10" name="endnote_10">[10]</a>endnote endnote endnote</p>
if (UltraEdit.document.length > 0) {
UltraEdit.insertMode();
UltraEdit.columnModeOff();
UltraEdit.activeDocument.hexOff();
//UltraEdit.ueReOn(); // UltraEdit
//UltraEdit.unixReOn(); // Unix
UltraEdit.perlReOn(); // Perl
// Change variable nNumber if first Footnote is to be > 1:
var nNumber = 1;
sNumber = nNumber.toString();
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.mode=0;
UltraEdit.activeDocument.findReplace.matchCase=true;
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.replaceInAllOpen=false;
UltraEdit.activeDocument.findReplace.replaceAll=true;
UltraEdit.activeDocument.findReplace.replace("<<","~A1~B1~C1~D1~E1~F1~G");
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.replaceAll=false;
while (UltraEdit.activeDocument.findReplace.replace("~A\\d+","~A"+sNumber)) {
UltraEdit.activeDocument.findReplace.replace("~B\\d+","~B"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~C\\d+","~C"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~D\\d+","~D"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~E\\d+","~E"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~F\\d+","~F"+sNumber);
UltraEdit.activeDocument.findReplace.replace("~G\\d+","~G"+sNumber);
nNumber++;
sNumber = nNumber.toString();
}
UltraEdit.activeDocument.findReplace.replaceAll=true;
UltraEdit.activeDocument.top();
// full string: <a href=\"endnote_x\" name=\"BACK_x\"><sup>[x]</sup></a>
// full string: <p><a NAME=\"endnote_x\" HREF=\"BACK_x\">[x]</a>
// ALL HTML '"' MUST BE QUOTED OUT!!!!
// snippetA: <a href=\"endnote_
// snippetB: \" name=\"BACK_
// snippetC: \"><sup>[
// snippetD: ]</sup></a><p><a NAME=\"endnote_
/ snippetE: \" HREF=\"BACK_
// snippetF: \">[
// snippetG: ]</a>
UltraEdit.activeDocument.findReplace.replace("~A","<a href=\"endnote_");
UltraEdit.activeDocument.findReplace.replace("~B","\" name=\"BACK_");
UltraEdit.activeDocument.findReplace.replace("~C","\"><sup>[");
UltraEdit.activeDocument.findReplace.replace("~D","]</sup></a><p><a NAME=\"endnote_");
UltraEdit.activeDocument.findReplace.replace("~E","\" HREF=\"BACK_");
UltraEdit.activeDocument.findReplace.replace("~F","\">[");
UltraEdit.activeDocument.findReplace.replace("~G","]</a>");
UltraEdit.selectClipboard(9);
UltraEdit.clearClipboard();
UltraEdit.activeDocument.top();
while(UltraEdit.activeDocument.findReplace.find("(?s)<p><a NAME=\"endnote.+?>>")) {
UltraEdit.activeDocument.copyAppend();
UltraEdit.clipboardContent += "\r\n";
} // <---END OF WHILE! (DON'T DELETE)
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.replace("(?s)<p><a NAME=\"endnote.+?>>","");
UltraEdit.activeDocument.bottom();
UltraEdit.activeDocument.paste();
UltraEdit.clearClipboard();
UltraEdit.selectClipboard(0);
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.replace(">>","</p>");
} // <---END OF "IF" IN LINE 1! (DON'T DELETE)
// EOF (With thanks to Mofi!)