problem with counting words

Peter M. Brigham pmbrig at gmail.com
Sun Oct 12 23:04:29 EDT 2014


On Oct 12, 2014, at 10:51 PM, J. Landman Gay wrote:

> 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.

You can create a plugin that opens invisibly when you start up LiveCode, and the plugin can contain a button with a script full of whatever functions and commands you want to have available. Then you can put this into the plugin stack script:

on openstack
   insert script of btn "myLibrary" into back
end openstack

And that will make all the handlers in the button script library available to you everywhere you work in LiveCode, automatically, since the library script will be activated whenever you start LC.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig





More information about the use-livecode mailing list