Re: [Clip] Re: Replace using list ...
> :LoopLike your idea and Axel's.
> ^!Inc %N%
> ^!Replace ";(^%Name^%N%%);\1;">> "^%Code^%N%%" WRS1
> ^!If ^%N%=^%Code0% End Else Loop
> */ Is the inconsistency in codes or names? Is there a tab after "DCC" or after "DCC Novi?" One way or another, I'd think it would help to prep them beforehand.
The inconsistency is that the name in the first file might be different
than the name in the second (Blank School & Preparatory Academy vs Blank
School AND Preparatory Academy -- or -- Rutherford-Central vs Rutherford
Central). After running through the first time if there are instances
where the "code" spot is over four characters then I can adjust that
particular school name -- there are only a couple like that.
- diodeom wrote:
> Then in the first listI take it you're thinking of one clip working on both - presumably open
- files. Could you elaborate a little on how to choose and swap the file
you're working on?
- I take it you're thinking of one clip working on both - presumably open
> - files. Could you elaborate a little on how to choose and swap the fileTwo clips, actually (much like in your concept). After populating both arrays from the tab-delimited doc (by the initial clip, maybe ran only once), the proper (looping) clip does its routine on the target list(s? -- maybe repetitively). I don't think there is much to be gained here by employing ^!Get/SetDocIndex (or whichever doc management functions/commands). It takes "a willing act of Don" :) to choose the docs, to clear (otherwise temporarily persisting) possibly hefty variables %Code% and %Name%, or to maybe preserve these arrays for any future use (by writing them to the second clip, or by populating a handy ini file with streamlined, paired school name/school code values), or to... -- and so on. Lots of maybes.
> you're working on?
- diodeom wrote:
> Two clips, actuallyI see. I tend always to forget, that arrays and other variables can
persist across clips. Out of a bit of misplaced purism I prefer not to
make use of that.