Adding a number to a sequence of lines ...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a need to append a number to an instrument definition file
according to this scheme:

Original file contains many entries like this

[ Bank 115]
4=PolarisEP ;Regular
5=ModernEP ;Regular
7=PhaseClavi ;Regular
16=DrawbarOrg2 ;Regular
17=MellowDraw ;Regular

for each line that contains "<number>=" I need to add one to the
number and place it after the "=" sign so it looks like this:

<number>=<number + 1><space> something

Then from my example the resulting file would look like this:

[ Bank 115]
4=5 PolarisEP ;Regular
5=6 ModernEP ;Regular
7=8 PhaseClavi ;Regular
16=17 DrawbarOrg2 ;Regular
17=18 MellowDraw ;Regular

This gives me the computers patch number as well as my data list
number for easy reference, if you were curious. The computer counts
up from 0, the data list from 1. I would spend a lot of time manually
changing the contents of my file otherwise, so if you could assist me
with a macro (word 2003) I would be very appreciative!

This is similar to an earlier request, for which a suggested vba
macro was offered, and it worked very well for subtracting one from
the data list number to get the computer number. Thanks for that ...
but it turns out I also needed the data list number (wouldn't you just
know!)



.



Relevant Pages

  • Re: Republican Recession will be worst since 1930s
    ... Currently under FRB control. ... rate to and as required above regular income rates, ... a bank, if it lends money like a bank, it's a bank. ... If you listen to the free market fans all they have to offer to solve the ...
    (rec.crafts.metalworking)
  • Re: Was this a scam? (B&M story)
    ... Although it was most likely not a scam, apparently a regular at ... He paid in $100 bills ... ... and showed the bills to a banker friend of his. ... bank robbery. ...
    (rec.gambling.poker)
  • Re: Can one start the FLGS?
    ... but he's a regular in rec.arts.sf.written. ... the business IN THE BANK before you start. ... I'm not planning to be the one doing ...
    (rec.games.frp.dnd)
  • Re: Banks without check "safekeeping" services?
    ... if the bank operates within the borders of Maryland, ... Even if you have such a bank, you'll find that recipients are now allowed ... now regular old joes can deposit ...
    (misc.consumers)
  • Re: Review MacSpeech Medical 3PM Thursday June 25,2009
    ... I pre-prepared a medical "profile" of all the ... specialized medical words that MacSpeech does not ... special Text Macro just for that word. ... regular user Vocabulary Editor feature that is part ...
    (comp.sys.mac.system)