Word count in UEM?

A place for users to discuss the Mac-based version of UltraEdit.

Word count in UEM?

Postby nkthen » Tue Jun 28, 2011 12:51 am

I don't know if I've missed this but is there a word count function for UltraEdit Mac version?
nkthen
Newbie
 
Posts: 3
Joined: Mon Jun 27, 2011 11:31 pm

Re: Word count in UEM?

Postby DaveS » Tue Jun 28, 2011 11:09 am

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>
User avatar
DaveS
Basic User
Basic User
 
Posts: 39
Joined: Wed Oct 27, 2010 8:49 am
Location: San Diego, California

Re: Word count in UEM?

Postby nkthen » Tue Jun 28, 2011 12:31 pm

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
nkthen
Newbie
 
Posts: 3
Joined: Mon Jun 27, 2011 11:31 pm

Re: Word count in UEM?

Postby Mofi » Wed Jun 29, 2011 1:12 am

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3936
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Word count in UEM?

Postby DaveS » Thu Jun 30, 2011 7:54 am

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
User avatar
DaveS
Basic User
Basic User
 
Posts: 39
Joined: Wed Oct 27, 2010 8:49 am
Location: San Diego, California

Re: Word count in UEM?

Postby Mofi » Thu Jun 30, 2011 10:58 am

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3936
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to UltraEdit for Mac General Discussion

cron