Word count in UEM?

Word count in UEM?

3
NewbieNewbie
3

    Jun 28, 2011#1

    I don't know if I've missed this but is there a word count function for UltraEdit Mac version?

    341
    Basic UserBasic User
    341

      Jun 28, 2011#2

      Not yet in UEM.... but you can add it yourself in a limited way.


      Add a User Tool...

      make the command line

      wc "%f"

      make sure you send the output to the Output Window

      there will be 3 numbers shown. <lines> <words> <characters>

      3
      NewbieNewbie
      3

        Jun 28, 2011#3

        Then, I think UEM should add it in soon. :)

        OK, at the meantime I have to do what you said but I'm a little confused on how you do it. :D

        6,606548
        Grand MasterGrand Master
        6,606548

          Jun 29, 2011#4

          I have another idea, you can use a script for this task. See Count words, characters and lines where I posted such a script for a special statistic analyses which could be modified for a more general usage.

          341
          Basic UserBasic User
          341

            Jun 30, 2011#5

            Not sure where a 100 line script is better than a ONE line Unix command.

            You must have version 2.2 or above to add user tools.
            1. Click on TOOLS --> TOOL CONFIGURATION
            2. Fill in the form that appears.
              Menu Item Name : Word Count
              Command Line : wc "%f"
              leave the rest blank
            3. Click on the OUTPUT TAB
              Make sure that CAPTURE OUTPUT and OUTPUT TO OUTPUT WINDOW are both checked
            4. Click APPLY
            You now have a Word Count command

            6,606548
            Grand MasterGrand Master
            6,606548

              Jun 30, 2011#6

              The script can be reduced in code for general usage and without comments it is only a few lines.

              The advantages of using a script:
              • The output format can be customized.
              • It can be written to output the statistic either to a message box, a new file, to output window, or even into the file itself.
              • The statistic output can be produced also for the entire file, or only selected text, or for selected text and entire file.
              • The word delimiters can be customized and it is possible to filter the word list before counting, for example to ignore strings with a single character like a or I.
              Summarized, using a script gives a user with good skills in writing scripts the possibility to customize the statistic output to personal needs. If such a customization is not required or a user has no skills in writing scripts, calling the word count tool is definitely the better solution.