I used this pattern in some of my macros:
Code: Select all
while Find 'sometext', 'E'
if condition 1
do this
elseif condition 2
do something else
end
Code: Select all
while Find 'sometext', 'E'
if condition 1
do this
elseif condition 2
do something else
end
end
...
Here is another, pretty simple, macro. I used this to superscript ordinals like 1st, 62nd 34th and so on in an imported file, since FixIt only works when one is typing. The original macro was:
Code: Select all
Find '(\d)(st|nd|rd|th)', '\1\2', 'EaU'
It worked OK until version 1.1. With version 1.2 font attributes are applied entirely. That is, captured text is converted to Monaco 12pt etc., which is my macro style. Then I had to change the macro as follows:
Code: Select all
Find '(?<=[0-9])(th|nd|rd|st)\>', 'aE'
Format:Baseline:Superscript
Greetings, Henry.