Amos Professional Manual  Contents  Index

Interface Resources


These components can be re-used to produce a large number of possible displays, such as in the next example diagram:

[1|2|2|2|3]
[4|5|5|5|6]
[4|5|5|5|6]
[7|8|8|8|9]

PUsh
Interface instruction: push image to an offset position in the Resource Bank
PU offset;

The PUsh command sets an offset value to the first image in the Resource Bank, and this offset will be added to all subsequent image numbers. This means that you can make a dialogue box totally independent from the images in the Resource Bank. For example, if new images are added at the beginning of the bank at any subsequent time, the images used by your existing resource commands will be pushed down the required number of places, and they will work perfectly without any changes in numbering required. To demonstrate this, the following two lines would have exactly the same effect:

X> PUsh 0; UNpack 0,0,13;
   PUsh 13; UNpack 0,0,0;

The Resource commands
Here is a full explanation of the additional AMOS Professional instructions and functions that can be used to exploit the Resource Bank.

RESOURCE BANK
instruction: select a bank to be used for resources
Resource Bank number

This command is used to tell AMOS Professional in which bank the resources to be used by Interface programs are kept. The number parameter holds the number of the memory bank to be allocated. If this bank does not exist, the Editor's internal resource bank will be used as a default. This means that after this command has been called, you can return to the Editor resources by employing a dummy value, such as zero. Here is an example:

X> Load "Resource.Abk",16 : Rem This can be any filename
   Resource Bank 16: Rem Set resources to Bank 16

RESOURCE$
function: read a message from the Resource Bank
message=Resource$(message number)

The RESOURCE$ function returns one of the messages from the current Resource Bank, to be used by an AMOS Professional program. If the bank has not been defined, the standard Editor messages will be made available from the Configuration file.

Back    Next
09.04.03