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

Re: [Clip] Find Unused Char

Expand Messages
  • Art Kocsis
    Hi Don, Well, I was right about one thing - it would not have been worth it - for me. It would have taken me many hours to design, write & debug your script.
    Message 1 of 30 , Nov 22, 2008
      Hi Don,

      Well, I was right about one thing - it would not have been worth it - for me.
      It would have taken me many hours to design, write & debug your script.
      And it would have been quite different and probably not as efficient. But I
      will save yours for possible future use. Thanks.

      I don't remember if I have ever used arrays so I had to them up to see what
      was going on. That's one of the benefits of this list - one can actually learn
      something! <g>

      Namaste', Art

      At 11/21/2008 05:48 PM, you wrote:
      >Oddly I just did this for a different clip I wrote ... you have to be
      >careful what special characters you use if you then use a regex search
      >with the variable in it as some special characters have meaning other
      >than literal in the regex.
      >
      >; find an odd character we can use for processing
      >; the odd character cannot appear in the file
      >^!SetArray
      >%odd_character_delimiter%="|";"`";"{";"}";"+";"*";"&";"%";"@";"!";"'"
      >^!Set %odd_character_count%="0"
      >
      >; let's find an odd character not in the file ...
      >:Loop_Odd_Character
      >^!Inc %odd_character_count%
      >^!If "^%odd_character_count%" > "^%odd_character_delimiter0%" ERROR
      >^!Find "^%odd_character_delimiter^%odd_character_count%%" CIWS
      >; if this special character is in file loop again
      >^!IfError NEXT ELSE Loop_Odd_Character
      >
      >; replace all paragraphs with special character
      >^!Replace "^P" >> "^%odd_character_delimiter^%odd_character_count%%" ACIWS
      >
      >And so forth.
      >
      >Art Kocsis wrote:
      ><snip>
      > > One could make this clip even more robust by testing the selection for
      > > the existence of the character and exiting or trying another character if
      > > found, but it is probably not worth the effort.
    Your message has been successfully submitted and would be delivered to recipients shortly.