Why Scripting?

An application provides scripting capabilities to allows the user to extend the application. Ideally, the user can add elements to the interface - new buttons or menu entries for a GUI application, new commands for a CLI, or something totally different for a different kind of interface. This allws the application to do something the user needs done regularly which isn't part of the standard interface.

For example, your word processor might have an integrated spell checker, thesaurus and dictionary. You might normally check a word in the thesaurus by selecting the word, copying the selection, opening the thesaurus, and then pasting the selection and clicking on "Ok". You would then copy and paste one of the synonyms into your document. This is fine if you only do this infrequently, but it's a bit clumsy if you do it every couple of minutes.

A script could make this much easier. Given a sufficiently rich scripting facility, it could copy the selection, get the list of synonyms from the thesaurus, and let you select one to replace the selection, or check their definitions - and do it all from a user-defined keystroke command or menu entry. Of course, a well-designed application could - and probably would - offer that kind of functionality to begin with.

Not all applications are well-designed, and some users have different needs than the application may cater to. A scripting facility allows the users to tailor - and extend - an application to better meet their needs.

On to What is a scripting language? or up to the contents.

Comments