Loading ...
Sorry, an error occurred while loading the content.

24063RE: [Clip] Using an external list in a loop.

Expand Messages
  • Art Kocsis
    Oct 13, 2013
    • 0 Attachment
      At 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.
      >
      >^!Replace "^(.+)$" >> "\^\!Replace \"$1\" >> \"$1\" AIRSW" AIRSW
      >
      >From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Sheri
      >Sent: Sunday, October 13, 2013 09:38
      >To: ntb-clips@yahoogroups.com
      >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.

      Sheri and I think alike.
      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)
      ^!Set %str2%=^$StrCapitalize("^%str1%")$
      ^!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.

      art
    • Show all 10 messages in this topic