home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
procedures
/
alert_proc_addon.amos
/
alert_proc_addon.amosSourceCode
Wrap
AMOS Source Code
|
1994-06-03
|
2KB
|
89 lines
'
' *** Alert Requester Procedure.
'
Procedure _ALERTREQUESTER[M$,B$]
'
' M$ - This string contains the text displayed on the requester.
' B$ - This string contains the button test, use the "|" character to
' separate the buttons eg "OK|CANCEL".
'
If M$="_Cc_"
Goto FIN
End If
'
I=0
IO=0
L=0
While I<Len(M$)
I=Instr(M$,"|",I+1)
If I=0
I=Len(M$)+1
End If
IO=I
Inc L
Wend
'
I=0
IO=0
B=0
While I<Len(B$)
I=Instr(B$,"|",I+1)
If I=0
I=Len(B$)+1
End If
IO=I
Inc B
Wend
'
_OPENDIALOGSCREEN[7,40+(L*8),50]
'
H=Screen Height-1
'
_DRAW3DBOX[0,0,639,39+(L*8),"",1,2,_BACK]
'
If B$=""
_DRAW3DBOX[10,5,629,8,"",1,_LIGHT,_COLOUR]
_DRAW3DBOX[10,H-8,629,H-5,"",1,_LIGHT,_COLOUR]
_DRAW3DBOX[10,8,629,H-8,M$,2,_TEXT,_BACK]
Goto FIN2
End If
'
_DRAW3DBOX[10,H-26,629,H-23,"",1,_LIGHT,_COLOUR]
_DRAW3DBOX[10,5,629,H-29,M$,2,_TEXT,_BACK]
'
B_DLG$=_DIALOGBUTTON$
_DIALOGBUTTON$=""
'
BB#=B
D2#=326.0-((BB#*100.0)/2.0)
'
I=0
IO=0
A=0
While A<B
I=Instr(B$,"|",I+1)
If I=0
I=Len(B$)+1
End If
_ADDBUTTON[D2#+100*A,H-18,D2#+100*A+86,H-5,Left$(Mid$(B$,IO+1,I-IO-1),10),A+1]
IO=I
Inc A
Wend
'
Repeat
_CHECKBUTTONS
Q=Param
Until Q
'
_DIALOGBUTTON$=B_DLG$
B_DLG$=""
'
ZN=0
'
FIN:
'
Screen Close 7
'
FIN2:
'
End Proc[Q]