EmEditor (text editor) Forum Index EmEditor Core Enhancement Suggestions
Macro s & r in block column selection | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| Stefan | Posted on: 5/21/2012 1:27 am |
Home away from home ![]() ![]() Joined: 7/14/2008 From: Germany, EU Posts: 285 |
Macro s & r in block column selection Hi Yutaka, i have an problem with replacing text
in an column/block selection from an macro. Tested with 11.0.5 and 11.1.7 My problem: if i take the block selected text, and manipulate it with an macro, the macro works correct but the text replacement in the document replaces all selected lines with the replacement of the first line only. Example: Having an text like and an code like Test 1 - works fine: - Select the whole text with line selection mode First Line Second Line Third Line - execute the macro - the MsgBox shows the wanted result - the lines are correct manipulated FXrst Line Second LXne ThXrd Line Test 2 - my problem: - Select only the first words in column selection mode First Line Second Line Third Line - execute the macro - the MsgBox shows the wanted result - BUT the lines in the selection are all replaced by the content of the first replacement: FXrst Line FXrstd Line FXrst Line Expected was to get: FXrst Line Second Line ThXrd Line Question: what should i modify to let this work as indented? I can imagine workarounds like - pos = get the right column pos of the selection - process each line - - - tempA = line.substring(0,pos) - - - tempB = line.slice(pos) - - - manipulate tempA - out = tempA+tempB ...but ...is that really as indented ? . |
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| » |
Stefan | 5/21/2012 1:27 am |
| |
Stefan | 4/8/2013 2:44 am |
| |
Yutaka | 4/9/2013 5:36 pm |
| |
Stefan | 4/11/2013 12:46 am |
| Register To Post | |


