ProGUIDE Mult!med!a Browser

ProGUIDE Markup Language

The Commandset

ProGUIDE's commands are of the same format as AmigaGuide commands. People familiar with AmigaGuide will have no problem using ProGUIDE markup. In ProGUIDE the same system of nodes is used as in AmigaGuides. A node is created using a command called @NODE. All text following the @NODE command up to the next @ENDNODE command belongs to the node. After @ENDNODE, a new node can be started with a new @NODE command. A Guide always starts with the @PROGUIDE (or @DATABASE for AmigaGuides) command.

In every Guide there must be a node called 'Main'. This is the first node of the Guide that should be put onscreen. The top part of a Guide is called the Global Section. Any ProGUIDE commands that are used here have a global effect: they affect all nodes in the Guide (if applicable). The global section of a guide ends at the first @NODE command. Inside the nodes, all the commands have only a local effect: they affect only that node, overriding any global settings.

As mentioned there are three types of commands: Commands, Attributes and Links. Let's take a look at some commands from each of these categories.


1. Commands

Commands are simply keywords that are executed in a similar way as BASIC commands: they are executed as soon as they are encountered (that is, if they are not used as a target for a link). Commands must always be at the start of a separate line: if they are not, ProGUIDE won't even recognize the command, and simply prints it to screen (assuming it is plain text). All commands start with an '@' sign. Let's take a look at a simple command:

@FONT topaz 8
SYNTAX: @FONT fontname fontsize

This command will load the font 'topaz' size 8. All following text will now be printed using that font. The @FONT command can be used many times per page to allow complicated layouts. If this command is used in the Global Section it will set the default font to use for all nodes that have not got any @FONT commands of their own.

Here's another example:

@SKIP 1
SYNTAX: @SKIP amount [PIXEL]

This will put the cursor to the next line. You can use negative numbers to transfer it backwards. When the keyword 'PIXEL' is supplied, you can move the cursor at pixel precision. The syntax for this command:

Now let's take a more complicated example:

@CALL mynode Argument1 "My name is John" 3
SYNTAX: @CALL nodename [arg1 arg2 ... argn]

The @CALL command will make ProGUIDE temporarily assume that the node 'mynode' is in fact part of the current page. The node 'mynode' will be inserted at the current cursor position (if there is text in 'mynode' that is). Inside the node 'mynode' the three arguments can be used so that the result of the @CALL command can very per call even when the same node is 'call'ed everytime. Note that quotes are required for arguments that contain whitespace.

The node 'mynode' could be difened like this:

@NODE mynode
This node is called 'mynode'.
Argument 1 contains: $1
Argument 2 contains: $2
Argument 3 contains: $3
Thank you for reading this.
@ENDNODE

The result of the above example would be:

This node is called 'mynode'.
Argument 1 contains: Argument1
Argument 2 contains: My name is John
Argument 3 contains: 3
Thank you for reading this.

As you can see, the arguments that are supplied via @CALL can be accessed using the dollar sign followed by the number of the argument, starting with one. The number of arguments is unlimited. In a normal node, the dollar sign has no special meaning and is used simply as text. Note that 'mynode' is not different from any other node, other than the fact that arguments are used. @CALL can be used on any available node!

Imagine what is possible when the @CALL command is used as a target for a link! Activating a link can provoke almost anything using this system!

There are many more commands:

@LSPACE pixels
Sets the amount of space between each line of text
@LBORDER pixels
Sets the size of the left border
@RETRACE
Retraces to the previous node. Used as a target for a link, this allows the creation of a custom retrace button.
@REQUEST text
A requester pops up displaying the text. (Also use as target for a link!)
@FADE amount
Fades the screen an amount towards black or white.
@INTRO nodename
Specify a node to use as intro sequence.
@EXIT nodename
Specify the node to go to just before unloading the current guide.
@SYSTEM filename
Starts an executable file. (Also use as target for a link!)
@IMAGE filename x y [PASTE] [SOLID]
Places an image at pixelposition x,y on the screen. The PASTE keyword can be used to paste the image into the backdrop graphics in stead of just onscreen. The background colour of the image (usually colour 0 of the palette) is made transparent, unless the SOLID keyword is supplied.
@PAL, @PATTERN, @AREA, @HELP, @MACRO, @SCREEN, @$VER:, @INDEX, etc. etc.

2. Attributes

Attributes are used to change settings that affect the text. They can be placed anywhere in the text; they do not need to be at the start of a seperate line. Attributes always start with the signs '@{' and end with the sign '}'.

Here's some examples:

@{b}, @{ub}, @{i}, @{ui}, @{u}, @{uu}, @{p}

These attributes change the current fontstyle. The b stands for bold, the u for underline and the i for italic. The extra u will turn off that particular style. The p stands for plain, and turns all others off. The print the word 'Hello' in bold fonstyle followed by the word 'everybody' in bold and italic fontstyle, this is what is required:

@{b}Hello @{i}everybody@{p}
RESULT: Hello everybody

In a similar way the textcolour can be changed at any time using the @{fg color} (foreground) and @{bg color} (background) attributes.


3. Links

Link commands look exactly the same as attributes. Here's an example to illustrate:

@{" Button text " LINK nodename}

The text between the quotes is the text that is displayed on the button. The node 'nodename' is displayed when the link is activated. This is the most common and simple form of linking. The node 'nodename' may also be in another guide (in another file)!

@{" Button text " CLINK @RETRACE}

Here the same button is linked to a ProGUIDE command '@RETRACE'. When the link is activated, the command '@RETRACE' is executed. Mindblowing effects can be achieved using:

@{" Button text " CLINK @CALL nodename}

A special kind of link command is the @AREA command. This is actually a normal command, only it creates a link. It can be used to create a clickable area anywhere on the screen and link it to a node or command. The position and size of the area are supplied as pixelcoordinates to allow full control. There are special options to automatically create an area around an onscreen image.

More information

Included in the ProGUIDE release are some manuals in ProGUIDE format. In them you can find everything about the ProGUIDE syntax, including a detailed description and examples of each command. Take a look at the DemoGUIDEs included with the release to see what is possible... It's all so easy...


The ProGUIDE program and this HTML file were created by AlcoRhythm of The Problem ©Copyright by The Problem.
More accurate information about the ProGUIDE markup language can be found in the ProGUIDE manuals that come with the release.