Scripting

From GNUstepWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Scripting is a process for task automation, functionality enhancing, fast prototyping, batch processing, etc. The process is done by a scripting language interpreter.

Introduction

There are situations, where you would like to:

  • quickly create a handy program
  • do some computation with numbers or objects
  • process some objects with one or more applications in a batch
  • use functionality of some framework without an application
  • test your program
  • ...

Those are situations where you can do scripting. Well, what the scripting is? It can be thought as manipulating objects in a handy way without need of long development process. The GNUstep environment offers more possibilities for scripting:

  • StepTalk - official GNUstep, language independent, scripting framework with Smalltalk as the default scripting language.
  • GNUstep Guile - GNUstep extension to make use of the GUILE scripting language.

Following sections describes StepTalk scripting capabilites. For more information, you can also consult articles in the scripting category.

Ways of scripting

How would you like to do that? Interactively, in a batch, from an application, from automaticaly generated script or from a database? There are many ways how you can do the scripting.

Shell - a handy tool for interactive scripting with GNUstep objects. StepTalk offers a tool named stshell (StepTalk tools).

Stand-alone script execution - The tool stexec (StepTalk tools) allows you to execute scripts stored in files. Just use:

> stexec myscript.st

Applications can have built-in scripting capabilities. To access them, just find the Scripting menu item, which opens standard application scripting panel with all application related scripts. For more information, read the Application scripting.

Any tool can create a scripting interface for users, where users can do customisation of the tool's behaviour. If you are interested in adding scripting extension to your tool, follow: Scripting support.

Languages

It is language independent - it uses languages as separate bundles. It can be extended by the "language bundles" providing other scripting languages. One experimental language bundle for Guile is included in the sources package.

See: Scripting language bundle

References

For developers (mainly)

For users (mainly)

Future

See: Scripting ideas