Two definitions that I find particularly useless are:
- Programming depends on the code's being compiled before deployment
- Scripting means that the code is "only" used to connect components
I was initially tempted to draw the line around the intention with which the code was written. I would have called one-off with limited lifetime and scope a script and everything else a program. But then, I have written quite a few such programs in C ... and I wouldn't call anything in C as scripted.
My current working definition is this: Scripted code tend to be limited in scope, small, and (hopefully) simple to understand and replace. Everything else is programmed. :-)