problem with counting words

J. Landman Gay jacque at hyperactivesw.com
Sun Oct 12 22:51:05 EDT 2014


On 10/12/2014, 7:42 PM, larry at significantplanet.org wrote:
> On the other hand, it is giving me fits having to go from regular quotes
> to curly quotes (for counting) and then back to regular quotes for
> display (since LC displays a curly quote as some oddball char).  But if
> I could write my own function for that stuff, wow.

I think I'd just make a copy of the text in a variable, delete all the 
quotes, and count the words. After you get the count, discard the 
variable. You don't need to reconstruct it.

>
> I do not have ANY experience with frontscripts, backscripts, plug-ins,
> whatever.

You can do what you want once you learn about that stuff. Many of us 
have custom libraries, frontscripts, and backscripts that help us work.

You could start here:
<http://www.fourthworld.com/embassy/articles/revolution_message_path.html>

A backscript is just a script you write that you can put into the 
message path; it receives messages after everything else gets a shot at 
them. The script can live in any object; buttons are common storage 
places. That's probably what you're looking for.

A frontscript is the same as a backscript only it gets messages before 
anything else; I'd avoid those until you understand the message path 
pretty well. See the link above.

A library behaves like a backscript, only the script has to be in the 
script of another stack; the stack is opened and put in use. The 
difference between a library and a backscript is minimal, except 
libraries get a message when they're first opened so they can respond if 
necessary. There used to be a slight difference in the layering order 
too, but I'm not sure whether that's still valid. Practically speaking, 
it's unimportant.

A plugin isn't what you want; it's just a stack that carries out some 
specific actions, and the IDE makes it available in the menu for 
convenience.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list