Home Page Bray Script: Quick Start Summary shopping cart
site currency

currency info
spacer Home spacer Barcode Mill spacer Barcode Fonts spacer How to order spacer Email us spacer
.
.
 
ANNOUNCEMENT

For 30 years I have been helping organisations and individuals with their Barcode and Auto ID issues but now I have decided it is time to move on and retire from being the Barcode Man.

I will continue to respond to emails from existing customers about their earlier purchases, their special programming configurations and warranty issues but I regret I cannot help with new purchases or issues nor recommend alternative products or sources.

Lee Allen, The Barcode Man. February 2010

Google
Web This site

Mule Resources

bulletMule Home
bulletMule Dispatcher
bulletBray Overview
bulletBray Basics
bulletBray Script Index
bulletBray DLL
bulletKeyboard Emulator
bulletKeyboard Scan Codes
bulletMule Quickstart
bulletTechnical Manual
bulletEngineering details
bulletLegacy Tech Manual
bulletLegacy downloads

The Mule is a trademark of Altek Instruments Ltd


Support Services

bulletTechnical Support
bulletHow to Order
bulletEmail us
bulletWho we are
bulletPolicy Statements
bulletSpam email from here?
lll

"To talk to a Mule you have to Bray..."

Anatomy of a Bray script

Quick Start Summary

This is a quick start summary of the main aspects of Bray. It is intended for programmers with some experience of other computer languages.

For full details, explanation and examples refer to the relevant topic.

General

  • A Bray script is a simple text file written using ASCII characters.
  • Line endings should be the standard PC style CRLF. (Unix/LF or Mac/CR line endings not yet supported)
  • Bray treats each line in the file as a separate unit so a Bray command, statement or comment cannot span two lines.
  • All ASCII characters having a value of 32 or less are considered to be white space.
  • Bray ignores spaces between its component parts.
  • Blank lines are ignored.
  • The comment character is hash (#). A hash character and any text between the hash and the end of the line is assumed to be a comment and ignored.
  • Bray itself is not case sensitive but data structures like strings may use mixed case characters which will be preserved.
  • Everything other than white space, blank lines and comments is assumed to be script content.

Script Content

  • Keywords are used in a Bray Sript to initiate actions. Keywords are not case sensitive.
  • Data in Bray consists of ASCII Strings and Scancode Strings. ASCII strings are surrounded by double quote characters. Scancode strings are surrounded by single quote characters
  • ASCII strings can be sent direct to the Mule without any need for further processing. Upper and lower case characters are interpreted by insertion of shift/unshift key codes at the appropriate moment. This is handled automatically by The Mule.
  • Scancode Strings provide the means to emulate a key which does not have an ASCII equivalent. For example the Function Keys, Alt Key combinations and others. The Keyboard Emulator can be used to find the appropriate codes.
  • Braced Packets (or just Packets) are a more convienent way to handle the Scancode String Primitives. A Braced Packet consists of a mnemonic key surrounded by brace characters. The mnemonic key is not case sensitive.
  • Some Packets are already defined in Bray. For additions and alterations refer to the DEFINE keyword.
  • Strings or Braced Packets in a line of Bray (other than parameters to keywords) are automatically concatenated, prepared and sent to the Mule. No keyword is needed to initiate this behaviour.
.
.
Top Home            © Lee Allen,2018