# How Long (Calculate your letters)

### By sagargulati on Jul 06, 2012

Hello,
Here is a simple script that allows you to count how much long a word or sentence it.

Syntax :
!howlong
/howlong

``````; How Long/ Word Calculator
; By Sagar/iLluSiOn
; gs.mindfreakers.net #Hawkee

on *:TEXT:!howlong*:#:  {
if (\$2 == \$null) { notice \$nick Syntax : !howlong <word> }
else { notice \$nick \$2- is \$calc(\$0 - 1) words, \$len(\$2-) letters long \$iif(\$0 >= 3,and \$len(\$remove(\$2-,\$chr(32))) without spaces,in a single word) }
}

alias howlong {
if (\$1 == \$null) { echo -at Syntax : /howlong <word> }
else { echo -at \$1- is \$calc(\$0) words, \$len(\$1-) letters long \$iif(\$0 >= 3,and \$len(\$remove(\$1-,\$chr(32))) without spaces,in a single word)  }
}
``````

sagargulati   -  Jul 26, 2012

@Lucius Done :)

Lucius   -  Jul 19, 2012

one thing though, the alias will show the wrong number of words, I only did it for the reply version which will count the trigger as a word eg:

!howlong legen wait for it dary legen wait for it dary is 5 words, 22 letters long and 18 letters without spaces. /howlong legen wait for it dary legen wait for it dary is 4 words, 22 letters long and 18 letters without spaces. the info is still the same, just the alias removes the trigger word from the calculation. change the alias line from \$calc(\$0 - 1) to \$0 There are always more things you can do, like count vowels, or count individual letters, find any grammaticals(,.:;!"), or numbers but then thats always the way with scripting, more to do, more to learn, more efficiency to find (or as it's called here napa-fy).
sagargulati   -  Jul 12, 2012

@Lucius : Thanks and edited!

Lucius   -  Jul 09, 2012

thats pretty useless as it is. anyone can do \$len(words go here)
to be usefull you'd be better adding in a few more bits of information, and remove the er on the end of longer in the reply too.

`````` else { notice \$nick \$2- is \$calc(\$0 - 1) words, \$len(\$2-) letters long \$iif(\$0 >= 3,and \$len(\$remove(\$2-,\$chr(32))) without spaces,in a single word) }
``````
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.