Amos Professional Manual  Contents  Index

AMOS Interface


Resources
Each Interface program has access to a number of objects, known as resources. These resources contain a set of images to be used for background effects, as well as a list of messages for titles or interactive buttons. There is a Resource Editor program on the Accessory Disc, which can be installed into a permanent memory bank ready for instant use. As a default, the Interface grabs the internal resources assigned to the Editor, allowing a complete range of useful images to be employed in your own programs. Resources are examined in detail in Chapter 9.4.

Calling an AMOS Professional Interface program

DIALOG BOX
function: display dialogue box on screen
button=Dialog Box(Interface$)
button=Dialog Box(Interface$,value,parameter$,x,y)

To display a requester or dialogue box, the DIALOG BOX function is used to handle your Interface commands from the specified Interface string. This dialogue now waits for either an appropriate button to be selected, or until a specific period of time has elapsed. The system then returns to the AMOS Professional main program, returning the value of the button. The dialogue box can be quit at any time by pressing [Ctrl]+[C]. If this is done, a value of zero will be returned.

The Interface$ parameter is a normal AMOS Professional string, containing the Interface program. This may be followed by various optional parameters:

The optional value parameter contains a value that is loaded straight into the internal variable array. It can then be accessed using the VA function, from the dialogue box, or requester.

Parameter$ holds an optional string parameter which will be forwarded to the Interface program. It will be saved as item 1 of the variable array (1 VA).

Finally, the optional coordinates x,y are given, to position the dialogue box on screen. These coordinates may be overridden by a BAse command inside the Interface program, and this is explained later. Here are some examples:

E> A$=A$+"SetVar 1,'The answer is', set variable one to a message"
   A$=A$+"SetVar0,42; variable zero is loaded with forty two"
   A$,A$+"PRint 0,100,1 VA,2; print the message"
   A$=A$+"PRint 0,110,0 VA #,2; print the answer"
   A$=A$+"EXit; leave the interface program"
   Print Dialog Box(A$)
   B$=B$+"PRint 0,0,1 VA,2; PRint 0,10,0 VA #,2; EXit;"
   D=Dialog Box(B$,42,"The Answer")
   D=Dialog Box(B$,42,"The Answer",100,100)
Back    Next
09.01.06