This chapter is intended to introduce how interpreters (with an 's' as in 'not only Python') can be used to extend Gaby capabilities.
![]() | This is not a documentation about writing script-fus in a particular language; even if most examples are written with Python. |
It should supersede the README in the Python plug-in subdirectory.
Script-fus can be used in several places to do several things.
Script-fus can be run from the 'Actions' menu, once they are defined correctly in the descfile:
This defines a 'Mail to' action (that will certainly launch a mail user agent) that take one arg (the E-Mail field from the AddressBook table) and is located in mailto.py that may be sitting in /usr/local/share/gaby/scripts/actions/ or in ~/.gaby/scripts/.
If the script writes to the screen, the output is catched and showed in a dialog box once the script is finished.
Once launched Gaby looks in the scripts directories (see above) for a file name autoexec.appname (ie autoexec.gaby when using Gaby as gaby and autoexec.gcd when using Gaby as gcd). If found it is executed.
When in 'Expert Mode' [1] there is a 'Home-brewed script' menu item in the 'Actions' menu. It allows you to select a script to run in a file selection box.
Together with the gabyscript it is possible to launch scripts without using the GUI; for example to perform automative tasks or to interface with other programs.
[1] | The only way to move to the so-called 'Expert Mode' is by editing your Gabyrc and adding 'expert_mode TRUE' in the 'common:misc' section. If you don't know how to do that you're not an expert and don't need this mode :) |