LargeEdit

Scripting Macros


LargeEdit now exposes its object model to allow users to create scripts (JScript\VBScript) to preform complex functionality.

The function below uses JScript's regular expression object to search LargeEdit's currently open and active file for text that matches email address. The matches found are outputed to the results log window.

	function Run() {
	    LargeEdit.ResultLog(' Email Scan ');

	    var inpStr = LargeEdit.CurrentFile.Text;

	    var oRe, oMatch, oMatches
	    oRe = new RegExp("(\\w+)@(\\w+)\.(\\w+)", "g");
	    // Look for an e-mail address (not a perfect RegExp)
	    // Get the Matches collection
	    var arr;
	    var retStr = '';
	    while ((arr = oRe.exec(inpStr)) != null) {
	      LargeEdit.ResultLog(arr.index + "-" + arr.lastIndex + "\t" + arr);
	    }
	} 

This example and more can be found in the LargeEdit install directory under scripts (Ex: C:\Program Files\Netlegger\LargeEdit\Scripts)