How to create complex macros - Part 2

Usage tips, posted by users. No questions here please.

Moderators: AmigoJack, helios, bbadmin, Bob Hansen, MudGuard

Post Reply
User avatar
ineuw
Posts: 191
Joined: Sun Mar 18, 2007 3:23 pm

How to create complex macros - Part 2

Post by ineuw »

The names on the left were assigned in case I wanted to string 20 macros into one, and each one assigned a file name, but I managed to crate a single macro for five different actions (without an error).

Name Find Replace_with

01_2SpcToSpc SpcSpc Spc
02_HRtAndSpc \nSpc \n
03_SpcAndHRt Spc\n \n
04_3HRt \n\n\n \n\n
05_HyphenAndHRt -\n nothing, join the line

06_SpcAndHyphen Spc- -
07_HyphenAndSpc -Spc -
08_SpcAndComma Spc, ,
09_SpcAndDot Spc. .
10_SpcAndsColon Spc; ;

11_SpcAndColon Spc: :
12_SpcAndqMark Spc? ?
13_SpcAndexMark Spc! !
14_TrimRMdash MDASHSpc MDASH
15_TrimLMdash SpcMDASH MDASH

16_EnclMDash MDASH {{MDASH}}
17_2HRtToSpc~~ \n\n ~~
18_~~To2HRt ~~ \n\n
19_HRtToSpc \n Spc
20_2DotsToDotSpcDot .. . .

The spaces above were supposed to be tabs and the MDASH character cannot be in the post. I use the macro to clean up and word wrap text from Wikisource/Wikipedia.

The macro is available for upload - if permitted
TextPad 8.16.0 64bit in English and TextPad 9.1.0 64bit in French, on two separate Windows installations
Post Reply