Amos Professional Manual  Contents  Index

Advanced Control Panels


Here is an example of a simple check:

X> Do
    D=Dialog(1)
    Exit If D<0
    If D>0
     On D Gosub BUTTON1,BUTTON2
     Wait Vbl
    Endif
   Loop

RDIALOG
function: read the status of a zone or button
button=RDIALOG(channel number,button number)
button=RDIALOG(channel number,button number, object number)

This function is used to read the position of a particular button or selector. Specify the number of an open Interface channel, and then give the number of the button or zone to be tested. There is also an optional parameter which can be specified to check one of several objects that have been assigned to a current zone number. If this object number is omitted, then the status of the first object defined in the current zone number will be returned. Object numbers are arranged according to the order in which they have been defined in the Interface program, so the first button has an object number of zero, the second will be read as 1, and so on.

The result returned by the RDIALOG function depends on the type of zone being scrutinised. In the case of a simple button, its current value will be given, but there are special numerical edit zones (explained later) which will return a new value entered by the user. If a text zone is checked in this way, a result of zero will given, and the RDIALOG$ function should be used instead. This is explained next.

RDIALOG$
function: return text string entered into an edit zone
text string=RDIALOG$(channel number,zone number)
text string=RDIALOG$(channel number,zone number,object number)

Use this function to return a string of text Assigned to a zone. If the selected zone does not contain any text, an empty string will be presented. Please see the Interface EDit command for more details.

Accessing a variable array

Variables that have been assigned to an active Interface channel can be read and modified directly from the main AMOS Professional program.

Back    Next
09.03.04