Difference between revisions of "Scripting"

From GNUstepWiki
Jump to navigation Jump to search
 
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
text from old wiki should be moved here ...
+
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 [[:Category:Scripting|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)'''
 +
* [[Scripting of frameworks]] - how to make your framework or bundle scriptable
 +
* [[Scripting support]] - how to make your product scriptable
 +
* [[Scripting language bundle|Language bundle]] - how to add a new language
 +
* [[Script management]]
 +
 
 +
'''For users (mainly)'''
 +
* [[Scripting context]] - what object do you know in scripts? what you should do with them?
 +
* [[Script objects]] - how to build objects with script-defined behaviour
 +
 
 +
* [[:Category:Scripting]] - everything about scripting in GNUstep
 +
 
 +
== Future ==
 +
 
 +
See: [[Scripting ideas]]
 +
 
 +
[[Category:Scripting]]

Latest revision as of 19:43, 20 February 2005

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