You need 2 macros for this job. The first one which you must create first is my universal submacro
CountUp which is posted at
counter ?After you have created the submacro CountUp, create the main macro for your individual usage which needs the macro property
Continue if a Find with Replace not found enabled.
The code for the main macro is:
InsertMode
ColumnModeOff
HexOff
UnixReOff
Clipboard 7
Top
Loop
Find RegExp "bottom="[0-9]+""
IfNotFound
ExitLoop
EndIf
EndSelect
Key LEFT ARROW
StartSelect
Key LEFT ARROW
Key LEFT ARROW
Key LEFT ARROW
Key LEFT ARROW
Copy
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
EndLoop
Top
Loop
Find RegExp "right="[0-9]+""
IfNotFound
ExitLoop
EndIf
EndSelect
Key LEFT ARROW
SelectWordCopy
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
SelectWord
PlayMacro 1 "CountUp"
EndLoop
Top
ClearClipboard
Clipboard 0
Add UnixReOn or PerlReOn (v12+ of UE) at the end of the macro if you do not use UltraEdit style regular expressions by default - see search configuration. Macro command UnixReOff sets the regular expression option to UltraEdit style.
Edited macro on 2006-08-20:Replaced
StartSelect
Key LEFT ARROW
Key LEFT ARROW
Key LEFT ARROW
Key LEFT ARROW
with the single command
SelectWord because the macro should work for all numbers not only for numbers with 4 digits.