home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
mag_discs
/
14
/
programs
/
banner
/
!BanEd
/
Documents
/
ScriptLang
< prev
Wrap
Text File
|
1994-06-22
|
6KB
|
123 lines
The Banner Script Language
--------------------------
!BanEd and !Banner both use a Script language to define how a banner should
look and behave. This is always a Text file (filetype &FFF) and is usually found
within a !Banner application.
All commands are case insensitive and must be followed by a space before any
parameters. Only one command is allowed per line. The last command in a script
must be followed by a RETURN character otherwise the application will flag an
'End of File' error. Each command line must have no trailing spaces. If an error
is found in a line, an error will be reported (if the error flag is set to On -
see the 'Error' command) and !Banner will quit. !BanEd also will report errors
in the same way but will not quit.
The default values are the ones used if a command doesn't appear in a script.
SpriteFile <filename> Default: None - command must appear in script
This command defines the filename of the sprite file which contains the sprite
to be displayed. It must occur within a script BEFORE a 'Sprite' command
(otherwise a 'Sprite file not defined' error will occur) but otherwise can be
placed anywhere within the script. The filename can, of course, contain System
variables (e.g. <Appl$Dir>) so files that are not within !Banner's directory but
in the parent application's directory can be easily pointed to. It's a good
ideas to have the sprite in its own file with no other sprites so that the
amount of memory claimed by !Banner is kept to a minimum.
Example: SpriteFile <FancyApp$Dir>.Sprites Sprite path is
<FancyApp$Dir>.Sprites
Sprite <name> Default: None - command must appear in script
This command defines the name of the sprite to be displayed from the sprite file
defined by the command 'SpriteFile'. Hence this command must always come after
the 'SpriteFile' command but does not have to be immediately after that command.
If the sprite does not exists within the sprite file an error will be flagged.
Example: Sprite FancyBan sprite name is FancyBan
Frame <colour number|Off> Default: 7 and not OFF
This defines the colour of the frame around the window (these numbers are the
same as the ones shown by the Palette utility). The frame can be prevented from
being displayed by specifying the OFF paramter. This command can be placed
anywhere within a script.
Examples: Frame 13 use colour 13
Frame OFF stop frame from being shown
Time <centiseconds> Default: 200 (i.e. 2 seconds)
This defines how long the banner is displayed. This command can be placed
anywhere within a script.
Example: Time 150 display time is 1.5 seconds
Font <font name> Default: System
This defines what font is used for any text displayed. It must be of the usual
format (i.e. Trinity.Medium). If the font doesn't exist an error will be
generated. 'System' can be specified to use the system font instead. This
command must come before the 'Text' command it is to apply to but otherwise can
come anywhere in the script.
Examples: Font Homerton.Medium.Oblique use Homerton.Medium.Oblique as the font
Font System use the system font
FontSize <Xsize>,<Ysize> Default: 12,12
This defines the x and y sizes of the font in points for the next (and possibly
following) 'Text' command. The parameters need not be integers. This command
must come before the 'Text' command it is to apply to but otherwise can come
anywhere in the script. This command does not work for the system font (as
defined by the command 'Font') as this is always displayed at the normal size.
Example: FontSize 20,25 set the width of the current font to 20 and the height
to 25
TextColour <foreground colour number>,<background colour number> Default: 7,0
This defines the colours to be used by the next (and possibly following) 'Text'
command. The numbers are the same as the ones shown by the Palette utility. This
command must come before the 'Text' command it is to apply to but otherwise can
come anywhere in the script.
Example: TextColour 7,0 set the colours to 7,0
Fill <On|Off> Default: Off
This defines whether the background of any text is transparent (Off) or is
coloured in with the current background colour (On).
Example: Fill Off Do not fill in the background
TextCoords <x>,<y> Default: None - must be included in the script
This defines where the next 'Text' command will display the text. The origin
(0,0) is at the bottom left of the window and all y coords up from this point
are positive; x coords to the right are positive. This command must come before
the 'Text' command it is to apply to but otherwise can come anywhere in the
script.
Example: TextCoords 200,-156 display the following text at 200 to the right
from the far left of the window, and 156 down from
the top of the window
Text <string> Default: None
This defines the string to be shown using the colours, fonts, sizes and position
defined by the preceding commands. The string can be upto 256 characters long.
Example: Text This is some text! displays 'This is some text!'
Error <On|Off> Defualt: On
This comman turns error reporting on or off. If errors in the script file are
found then the application will always quit but will only report why if the
error flag is set to On. This command can be placed at any point in the script.
This command is usefull for debugging a script - a dodgy line can be preceded by
an 'Error On' command and followed by an 'Error Off' command.
Example: Error Off prevent error messages generated by a bad script from being
reported