EmEditor (text editor) Forum Index Questions and Answers about Macros
anybody got a macro or other tool that can do Select Paragraph? | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| webern | Posted on: 2/26/2011 1:49 pm |
Not too shy to talk ![]() ![]() Joined: 11/23/2006 From: Moscow, Russia Posts: 38 |
Re: anybody got a macro or other tool that can do Select Paragraph? [CODE]
// File: Select_Paragraph.jsee // Autor: Dmitry Pirozhkov // Date: 23.Nov.2006 // Info: Macro to select the entire paragraph. // Requires: EmEditor Professional v.7.00 or later // Usage: Place the cursor anywhere within a paragraph you wish to select. Run this macro. var blankLine = "^$"; //the paragraph delimiter var y1; with (document.selection) { if (document.GetLine(GetActivePointY(eePosLogical), eeGetLineWithNewLines).length<=2) { alert ("Please, place the cursor on the non-blank line."); Quit(); } if (!Find(blankLine, eeFindPrevious | eeFindReplaceQuiet | eeFindReplaceRegExp)) { y1 = 1; } else y1 = GetActivePointY(eePosLogical)+1; if (!Find(blankLine, eeFindNext | eeFindReplaceQuiet | eeFindReplaceRegExp)) { EndOfDocument(); } SetActivePoint(eePosLogical, 1, y1, true); StartOfLine(true,eeLineHomeText); //to perceive an indent as the paragraph boundary } [/CODE] |
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| |
gning | 2/25/2011 12:00 pm |
| » |
webern | 2/26/2011 1:49 pm |
| |
shx | 2/28/2011 9:02 am |
| |
webern | 2/28/2011 10:45 am |
| |
gning | 2/28/2011 11:42 am |
| |
webern | 2/28/2011 11:40 pm |
| |
gning | 6/16/2011 9:48 am |
| Register To Post | |


