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

23290RE: [Clip] Help creating a NoteTab variable from a text file

Expand Messages
  • John Shotsky
    Oct 1, 2012
    • 0 Attachment
      Yes, that is perfect. Thank you!

      Regards,
      John
      RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Ian NTnerd
      Sent: Sunday, September 30, 2012 18:44
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] Help creating a NoteTab variable from a text file


      John,

      On NTP 6.2 the following works for me.
      ^$StrReplace("^p";"|";"^$GetFileText("c:\path\file.txt")$";Yes;Yes)$

      Is that what you want?

      Ian

      On 1/10/2012 6:12 AM, John Shotsky wrote:
      >
      > I have several text files with lists of items in them. Each item in
      > each list exists on one line, with no blank lines or
      > comment lines included. There may be one or more words.
      > I currently use a loop to process through files looking for these
      > phrases, which works for the most part, although I
      > don't have access to \b to control when a word is part of a larger
      > word that should not be changed.
      >
      > So, I would like to read the text file into a memory variable at the
      > beginning of each run of my library, then just use
      > that variable as needed in various places. I need a vertical bar to
      > replace the CR's between each line. I've played
      > around with this a little, but I seem to be missing some basic thing,
      > like knowing how to do replacements within 'get
      > text' strings.
      >
      > I think it should go something like 'get text' from the file, replace
      > CR with | and store to a variable. I don't want to
      > lose the focus of the currently open file during any part of this process.
      >
      > Here's an example list:
      > This
      > The
      > Then
      > Therefore
      > Thence
      >
      > I want a variable named, perhaps '%T_words%', and it should contain
      > "This|The|Then|Therefore|Thence". In fact, I will
      > place a \b before and after each word, but I'll be able to do that
      > when I see how to replace the CR's.
      >
      > Any ideas?
      > Thanks,
      > John
      >
      > [Non-text portions of this message have been removed]
      >
      >

      [Non-text portions of this message have been removed]



      [Non-text portions of this message have been removed]
    • Show all 6 messages in this topic