Counting number of characters
Posted: Mon May 05, 2008 10:49 am
Hi, I'm trying to create a button that will count the number of characters, like a word count but a character count instead.
This is the code I have come up with but seems to come up with a random string of numbers:
Where've I gone wrong?
Thanks
Omar
This is the code I have come up with but seems to come up with a random string of numbers:
Code: Select all
on mouseUp
local tNumber, tNumOutput
put field "Text" into tNumber
repeat for each char theChar in tNumber
put chartonum(theChar) after tNumOutput
end repeat
put tNumOutput into field "Count"
end mouseUp
Thanks
Omar
