Scripting

From GNUstepWiki
Jump to navigation Jump to search

Introduction

There are situations, where you want 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.

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

Future

See: Scripting ideas