24063RE: [Clip] Using an external list in a loop.
- Oct 13, 2013At 10/13/2013 10:50 AM, you wrote:
>Wow, that took it from 30 seconds to about 1 second. I had to insert an item to fix just to make sure it was working. Now to figure out how to create the clip code from the list. I used the following to create it in the first place, but I don't know how to create the commands from the list and then run the newly created commands on the document under consideration.Sheri and I think alike.
>^!Replace "^(.+)$" >> "\^\!Replace \"$1\" >> \"$1\" AIRSW" AIRSW
>From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Sheri
>Sent: Sunday, October 13, 2013 09:38
>Subject: Re: [Clip] Using an external list in a loop.
>Just a thought but assuming it must be done with clipcode only, maybe it would be faster to make your clip create a new clip that is a series of 700 replace-all replacements and run that clip, rather than process any loops.
If you want to work with computers one must think like a computer!
Anyway, creating the replacements from a list is trivial (it doesn't even need RegEx!):
^!Set %str1%=test string (lower case)
^!Replace "^%Str1%" >> "^%Str2%" AIW
Put this in a loop and replace "test string (lower case)" with ^%array^%i%% where %array% is defined by ^!SetArray %array%=^$GetFileText(FileName)$ and you have preset delimiter to CRLF.
- << Previous post in topic Next post in topic >>