Solution:
Pseudocode (actual code below)
1. Go to top of page
2. Create new file and insert sequential numbers, one per line
3. Go to top of page
4. Select to end of line and cut
5. delete line (so next number is at top of file)
6. Go to previous document and find DbgMsg text (preceding the number to be replaced)
7. Deselect using right arrow key, then select number to be replaced, then paste
8. Go to next document (i.e. new document with sequential numbers)
Loop 4-8 until search text isn't found and script aborts.
- Code: Select all
Top
NewFile
"10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69"
Top
Loop 60
StartSelect
Key END
EndSelect
Cut
Key DEL
PreviousDocument
Find "d := dbgmsg"
Key RIGHT ARROW
StartSelect
Key Ctrl+RIGHT ARROW
EndSelect
Paste
NextDocument
EndLoop
ExitMacro




