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

24076RE: [Clip] Capitalization without a loop

Expand Messages
  • John Shotsky
    Oct 16, 2013
    • 0 Attachment
      Yes, the titles are randomly located at the tops of the recipes.
      So far, using replace statements only, and no loops (except 'IfError'), I have gotten all 13,500 titles from all upper case to
      capitalized on the first character of each word in 30 seconds flat. That is close to 40 times faster than the loops were, so it's
      looking good already. It's a large clip, because every letter and every high-order letter (accented, etc) must be handled
      individually, twice, so it's a little over 200 lines counting the IfError lines between each clip. The average file will have under
      100 titles, so that should now be an insignificant amount of time. The nice thing about the replaces is that they don't activate
      unless the action is needed. The loops process each line, whether needed or not.

      Regards,
      John
      RecipeTools Web Site: http://recipetools.gotdns.com/
      John's Mags Yahoo Group: http://groups.yahoo.com/group/johnsmags/


      -----Original Message-----
      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Ian NTnerd
      Sent: Wednesday, October 16, 2013 08:31
      To: ntb-clips@yahoogroups.com
      Subject: Re: [Clip] Capitalization without a loop

      John,

      So in your data is every line a "Title"? If not then your data sample
      does not help me test a solution.

      With your data sample, you just select the whole document and Capitalize
      that. I doubt that is what you mean.

      I am thinking that between each title is a recipe or some other data.

      Title::THE BIG EASY CRAWFISH OMELET
      Ingredients:
      etc
      Title::THE CLASSIC HOT BROWN



      Ian

      On 16/10/2013 8:48 PM, John Shotsky wrote:
      > RecipeClips work files have sections with titles (recipes). Each title is preceded by a tag of Title::
      > I want to capitalize each word in each title using the Toolbar Capitalize command rather than a loop, which is how I currently do
      > it.
      > In order for the toolbar command to function, the text in the title needs to be selected.
      > So, I would like to select only the titles, all at once, use the toolbar command and be done with it.
      > Currently, each title is selected separately, then capitalized using
      > ^!InsertText ^$StrCapitalize("^$GetSelection$")$
      > It is slightly faster to use the InsertText command in a loop than the Toolbar Capitalize command, but that would still leave the
      > whole process in a loop.
      > I've been looking at ^$GetDocReplaceAll, but I can't see how to form a command that would do what I want.
      >
      > For testing, I have a list of about 13,000 tagged titles.
      > Using a loop with the above InsertText command title cases 7200 of them in 10 minutes.
      > Using the same loop with a Toolbar Capitalize command title cases 5100 of them in 10 minutes.
      > Selecting them all, and using the Toolbar Capitalize command without a loop takes about 1 second.
      > Clearly, if I can determine how to select them all at once, a single toolbar command would be sufficient.
      > Any ideas?
      >
      > Here are some sample titles:
      > Title::THE BIG EASY CRAWFISH OMELET
      > Title::THE CLASSIC HOT BROWN
      > Title::THE GORE CREEK BAGEL
      > Title::THE GUADALAJARA
      > Title::THE INVISIBLE SALMON WRAPPED IN GHOSTLY RICE PAPER LYING IN A TOMATO BLOOD PUDDLE ON BLACK BEAN PAVEMENT BY A BROCCOLI TREE
      > Title::THE PERFECT CHEESECAKE
      > Title::THE SANTA FE WRAP
      > Regards,
      > John
      >
      >
      >
      >
      >
      > ------------------------------------
      >
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      >
      > ***
      > Yahoo! Groups Links
      >
      >
      >
      >



      ------------------------------------

      Fookes Software: http://www.fookes.com/
      NoteTab website: http://www.notetab.com/
      NoteTab Discussion Lists: http://www.notetab.com/groups.php

      ***
      Yahoo! Groups Links
    • Show all 12 messages in this topic