home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / mag_discs / 14 / programs / banner / !BanEd / Documents / ScriptLang < prev   
Text File  |  1994-06-22  |  6KB  |  123 lines

  1. The Banner Script Language
  2. --------------------------
  3.  
  4.  !BanEd and !Banner both use a Script language to define how a banner should
  5. look and behave. This is always a Text file (filetype &FFF) and is usually found
  6. within a !Banner application.
  7.  All commands are case insensitive and must be followed by a space before any
  8. parameters. Only one command is allowed per line. The last command in a script
  9. must be followed by a RETURN character otherwise the application will flag an
  10. 'End of File' error. Each command line must have no trailing spaces. If an error
  11. is found in a line, an error will be reported (if the error flag is set to On -
  12. see the 'Error' command) and !Banner will quit. !BanEd also will report errors
  13. in the same way but will not quit.
  14.  The default values are the ones used if a command doesn't appear in a script.
  15.  
  16.  
  17. SpriteFile <filename>  Default: None - command must appear in script
  18.  
  19. This command defines the filename of the sprite file which contains the sprite
  20. to be displayed. It must occur within a script BEFORE a 'Sprite' command
  21. (otherwise a 'Sprite file not defined' error will occur) but otherwise can be
  22. placed anywhere within the script. The filename can, of course, contain System
  23. variables (e.g. <Appl$Dir>) so files that are not within !Banner's directory but
  24. in the parent application's directory can be easily pointed to. It's a good
  25. ideas to have the sprite in its own file with no other sprites so that the
  26. amount of memory claimed by !Banner is kept to a minimum.
  27. Example: SpriteFile <FancyApp$Dir>.Sprites   Sprite path is
  28.                                              <FancyApp$Dir>.Sprites
  29.  
  30.  
  31. Sprite <name>  Default: None - command must appear in script
  32.  
  33. This command defines the name of the sprite to be displayed from the sprite file
  34. defined by the command 'SpriteFile'. Hence this command must always come after
  35. the 'SpriteFile' command but does not have to be immediately after that command.
  36. If the sprite does not exists within the sprite file an error will be flagged.
  37. Example: Sprite FancyBan   sprite name is FancyBan
  38.  
  39.  
  40. Frame <colour number|Off>  Default: 7 and not OFF
  41.  
  42. This defines the colour of the frame around the window (these numbers are the
  43. same as the ones shown by the Palette utility). The frame can be prevented from
  44. being displayed by specifying the OFF paramter. This command can be placed
  45. anywhere within a script.
  46. Examples: Frame 13    use colour 13
  47.           Frame OFF   stop frame from being shown
  48.           
  49.  
  50. Time <centiseconds>  Default: 200 (i.e. 2 seconds)
  51.  
  52. This defines how long the banner is displayed. This command can be placed
  53. anywhere within a script.
  54. Example: Time 150   display time is 1.5 seconds
  55.  
  56.  
  57. Font <font name>   Default: System
  58.  
  59. This defines what font is used for any text displayed. It must be of the usual
  60. format (i.e. Trinity.Medium). If the font doesn't exist an error will be
  61. generated. 'System' can be specified to use the system font instead. This
  62. command must come before the 'Text' command it is to apply to but otherwise can
  63. come anywhere in the script.
  64. Examples: Font Homerton.Medium.Oblique   use Homerton.Medium.Oblique as the font
  65.           Font System             use the system font
  66.           
  67.           
  68. FontSize <Xsize>,<Ysize>  Default: 12,12
  69.  
  70. This defines the x and y sizes of the font in points for the next (and possibly
  71. following) 'Text' command. The parameters need not be integers. This command
  72. must come before the 'Text' command it is to apply to but otherwise can come
  73. anywhere in the script. This command does not work for the system font (as
  74. defined by the command 'Font') as this is always displayed at the normal size.
  75. Example: FontSize 20,25  set the width of the current font to 20 and the height
  76.                          to 25
  77.                          
  78.                          
  79. TextColour <foreground colour number>,<background colour number>  Default: 7,0
  80.  
  81. This defines the colours to be used by the next (and possibly following) 'Text'
  82. command. The numbers are the same as the ones shown by the Palette utility. This
  83. command must come before the 'Text' command it is to apply to but otherwise can
  84. come anywhere in the script.
  85. Example: TextColour 7,0  set the colours to 7,0
  86.  
  87.  
  88. Fill <On|Off>  Default: Off
  89.  
  90. This defines whether the background of any text is transparent (Off) or is
  91. coloured in with the current background colour (On).
  92. Example: Fill Off  Do not fill in the background
  93.  
  94.  
  95. TextCoords <x>,<y>  Default: None - must be included in the script
  96.  
  97. This defines where the next 'Text' command will display the text. The origin
  98. (0,0) is at the bottom left of the window and all y coords up from this point
  99. are positive; x coords to the right are positive. This command must come before
  100. the 'Text' command it is to apply to but otherwise can come anywhere in the
  101. script.
  102. Example: TextCoords 200,-156  display the following text at 200 to the right
  103.                               from the far left of the window, and 156 down from
  104.                               the top of the window
  105.                               
  106.                               
  107. Text <string>  Default: None
  108.  
  109. This defines the string to be shown using the colours, fonts, sizes and position
  110. defined by the preceding commands. The string can be upto 256 characters long.
  111. Example: Text This is some text!  displays 'This is some text!'
  112.  
  113.  
  114. Error <On|Off>  Defualt: On
  115.  
  116. This comman turns error reporting on or off. If errors in the script file are
  117. found then the application will always quit but will only report why if the
  118. error flag is set to On. This command can be placed at any point in the script.
  119. This command is usefull for debugging a script - a dodgy line can be preceded by
  120. an 'Error On' command and followed by an 'Error Off' command.
  121. Example: Error Off  prevent error messages generated by a bad script from being
  122.                     reported
  123.