File: SCRIPTING

package info (click to toggle)
gmoo 0.5.6-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,412 kB
  • ctags: 2,213
  • sloc: ansic: 18,320; sh: 5,396; makefile: 385; perl: 205; sed: 93; tcl: 30
file content (20 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Scripting in gmoo
-----------------

Currently gmoo understands 2 scripting languages: Perl and Tcl
The basic system is simple, this is wat gmoo will do:
 - look in $HOME/.gmoo/scripts for files that match [^\.].*\.(pl|tcl)
   (all files not starting with a `.' and ending with `.pl' or `.tcl'
   - If a file ends with `.pl' interpret it as a Perl script
   - If a file ends with `.tcl' interpret it as a Tcl script
- look for the ame type of files in $PREFIX/share/gmoo/scripts and interpret
  them if a file with the same name hasn't been interpreted yet (so you can
  overwrite the default scripts)

What may and can the scripts do
-------------------------------
gmoo defines a couple of functions to the interpreters to let the scripts
interact with the worlds and the client, it will also let you register
functions that will be runned on an event.

See SCRIPT_FUNCTIONSL for the specification of the scripting API.