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.

Returns currently selected text. Example:
var text = UltraEdit.activeDocument.selection;
var found = orgDoc.selection == "<?xml";



//let this script run on a file with one line that looks like this:
//The isFound in UE 13+4 works bad I think
var orgDoc = UltraEdit.document[0];
orgDoc.columnModeOff;
orgDoc.top();
orgDoc.findReplace.regExp = false;
orgDoc.findReplace.matchWord = false;
orgDoc.findReplace.matchCase = false;
orgDoc.findReplace.searchDown = true;
orgDoc.findReplace.matchWord = false;
orgDoc.findReplace.find("works");
if ( orgDoc.isFound() ) {
UltraEdit.getString(" works is found (as expected)",1);
}
else {
UltraEdit.getString("works is NOT found",1);
}
orgDoc.top();
orgDoc.findReplace.find("lalala");
if ( orgDoc.isFound() ) {
UltraEdit.getString(" lalala is found :-/",1);
}
else {
UltraEdit.getString("lalala is NOT found (as expected)",1);
}




lala = abc
lala = def
lala = ghi
lala = jkl
var orgDoc;
UltraEdit.activeDocument.copy();
UltraEdit.newFile();
orgDoc = UltraEdit.activeDocument;
orgDoc.paste();
orgDoc.top();
//this one positions cursor at line 3, it works.
//UltraEdit.activeDocument.findReplace.find("lala");
//UltraEdit.activeDocument.findReplace.find("lala");
//UltraEdit.activeDocument.findReplace.find("lala");
//This one is strange
var i = 0;
while (true) {
if (orgDoc.findReplace.find("lala") ) {
i++;
}
else
{
break;
}
}
UltraEdit.document[1].write("Found that many times: " + String(i));Found that many times: 1 = abcFound that many times: 4
var orgDoc;
orgDoc = UltraEdit.activeDocument;
orgDoc.top();
var i = 0;
while (orgDoc.findReplace.find("lala")) {
i++;
}
UltraEdit.getString("Found that many times: " + String(i),1);

nospaces = 123;
somespaces = 456;
nospaces = 123;
somespaces = 456;
