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.



function getCol() {
var i = 0;
while (true) {
if (UltraEdit.activeDocument.isColNum(i)) {
return i;
}
i++;
}
return i;
}
var iCol = 0;
iCol = getCol();
UltraEdit.activeDocument.write(String(iCol));
UltraEdit.activeDocument.write("Fertig");
function getCol() {
//get the current Column.
//speed-optimized. Hop to the right in steps. Then, when being bigger, hop back one by one.
//Kind of "binary-tree" for fools ;-)
var i = 1;
var iStep = 10;
while (true) {
if (UltraEdit.activeDocument.isColNumGt(i)) {
//still too much on the left side.
i = i + iStep;
}
else
{
//hopped too far. go a little bit back
for (var j = 0; j < iStep; j++) {
//UltraEdit.document[1].write(String(j));
if (UltraEdit.activeDocument.isColNum(i-j)) {
//match !
//UltraEdit.document[1].write("Match mit " + String(j));
return (i-j);
}
}
};
}
return i;
}
var iCol = 0;
iCol = getCol();
UltraEdit.activeDocument.write(String(iCol));
UltraEdit.activeDocument.write("Fertig");

function getCol() {
//get the current Column.
//speed-optimized. Hop to the right in steps. Then, when being bigger, hop back one by one.
//Kind of "binary-tree" for fools ;-)
var i = 1;
var iStep = 10;
while (true) {
if (this.isColNumGt(i)) {
//still too much on the left side.
i += iStep;
}
else
{
//hopped too far. go a little bit back
for (var j = 0; j < iStep; j++) {
if (this.isColNum(i-j)) {
return (i-j);
}
}
};
}
return i;
}
UltraEdit.activeDocument.prototype.CurCol = getCol;
var endOfLine = "\r\n";
UltraEdit.activeDocument.selectToTop();
myLines = UltraEdit.activeDocument.selection.split(endOfLine);
line = myLines.length;
column = myLines[myLines.length -1].length + 1;
UltraEdit.getString("Line: " + line + " Column: " + column, 1);
UltraEdit.activeDocument.gotoLine(line, column);


var endOfLine = "\r\n";
var tab = "\t";
var spacesForTab = 2;
var column = 1;
var line;
UltraEdit.activeDocument.selectToTop();
myLines = UltraEdit.activeDocument.selection.split(endOfLine);
line = myLines.length;
tabsInLastLine = myLines[myLines.length -1].split(tab).length - 1;
column += tabsInLastLine * ( spacesForTab - tab.length ) + myLines[myLines.length -1].length;
myLines = null;
UltraEdit.activeDocument.gotoLine(line, column);
UltraEdit.getString("Line: " + line + " Column: " + column, 1);
