home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-03-06 | 1.3 KB | 50 lines |
- '===========================================================================
- ' Interface example 7.
-
- ' Written by Andy Smith for Amoszine
- '===========================================================================
-
-
- Resource Screen Open 0,640,256,0
- A$=A$+"BAse 200,100;"
- A$=A$+"SIze 250,50; SAve 1;"
- A$=A$+"BOx 0,0,1,250,50;"
- A$=A$+"PRint 10,2,'Enter some numbers below',7;"
- A$=A$+"LIne 8,15,17,240;"
-
- ' The DIgit command follows below. It sets up a digit zone where to can type
- ' just numbers. The parameters are (in order):
-
- ' Identification number which ranges from 1 upwards.
- ' The X coordinate
- ' The Y coordinate
- ' The maximum amount of characters that can be entered
- ' A value. In this case '999' is displayed. This will be displayed
- ' when then the zone is first set up.
- ' A flag. A zero means nothing is displayed, any other value displays the 999
- ' The paper colour
- ' The pen colour
-
- A$=A$+"DIgit 1,16,19,8,999,1,0,7;"
-
- A$=A$+"EXit;"
-
- Dialog Open 1,A$
-
- R=Dialog Run(1)
- Repeat
- BUTTON=Dialog(1)
- Until BUTTON<>0
-
- ' The Rdialog function returns a number from a zone. Its parameters are as
- ' follows:
-
- ' The channel number
- ' The zone. Which corresponds to the interface program. Zone 1 is the DIgit
- ' zone.
-
- NUMBER=Rdialog(1,1)
-
- Dialog Close 1
-
- Print "You typed : ";NUMBER