![]() |
||||||
ReadyScript Syntax | ||||||
Just as in any language, you'll need to understand its syntax before you start writing in it. ReadyScript is a command language, a type of programming language shorthand. ReadyScript is designed to be a simple, English-based language with a relatively small set of commands and rules. The rules, which include particular spellings, punctuation symbols, and designated sequences for the commands and arguments, make up the ReadyScript command language syntax. The rules are designed to be simple, but must be followed exactly. If they are not followed, there's a good chance your script won't work. A ReadyScript statement is made up of the command name, an equal sign, and a list of arguments with argument values (if applicable), and the whole statement is surrounded by curly brackets ({ }).
The format for a command language statement is:
{COMMAND=argument1, argument2, }
Note that:
Curly brackets are required at the beginning and the end of each statement.
The command name must be spelled correctly. Each of the command names, although they were designed to emulate the Sahafi commands for easy use, must be spelled according to their ReadyScript names.
An equal sign separates the command name from the arguments. Spaces are not necessary on either side of the equal sign.
Arguments are separated by commas. Spaces are not necessary after the comma and are ignored, although you can use them if you wish.
Imported text and associations of text to a name are set off by colons (:).
Typographic commands are set off by the less than (<) and the greater than (>) symbols.
Symbolic equivalents for hidden characters (such as carriage returns or tab settings) or punctuation marks (such as colons or commas) that are used in ReadyScript are set off by the less than (<) and the greater than (>) symbols.
Capitalization and spacing are optional. Sahafi does not interpret ReadyScript text information by case, and strips all spaces before interpreting a command.
Argument values that can be assigned a number are represented by an "n" directly following the argument. For example, <LSn> means Line Spacing (leading) with a value of "n," which you can assign. When you use the argument in a statement, you type the actual value, such as <LS14> or <LS14.5>.
Some commands require only one argument while other commands require several arguments.
Argument values must fall within the range acceptable to Sahafi For example, Sahafi accepts values up to 327 points for point size. If you use a value for point size larger than 327 in an argument, your script will not work, even though it may be syntactically correct.