How to include a script inside another script

8 views
Skip to first unread message

M.Emmanuel

unread,
Sep 23, 2025, 1:30:13 PM (11 days ago) Sep 23
to TheDBCommunity
Paradox DOS 4.5 - PAL

I am trying to build a library using the following script:

Applib = "UI"

CREATELIB Applib

CHAIN MSGBOX
CHAIN DOMENU

WRITELIB Applib MSGBOX
WRITELIB Applib DOMENU

RELEASE PROCS MSGBOX
RELEASE PROCS DOMENU

The files MSGBOX and DOMENU contain the procedures. For instance MSGBOX.SC is included after.

I have used CHAIN to "include" the file but that is not correct, I am looking for the right keyword to run/load a script inside another script in Paradox DOS PAL.

```
;Msgbox.sc
;Display a message in a box with an Accept button
;Top left corner at coordinates Tlr,Tlc
;Height Hgt (must be at least 6 to accommodate message
;and button)
;Width Wdth (must be at least message length + 5)

PROC Msgbox(Msg,Tlr,Tlc,Hgt,Wdth)

PRIVATE ButtonMargin,MsgMargin,Msglen

;CALCULATE LEFT MARGIN TO CENTER MESSAGE
Msglen = LEN(Msg)
MsgMargin = INT((Wdth-Msglen)/2)

;CALCULATE LEFT MARGIN TO CENTER
; ACCEPT BUTTON
ButtonMargin = INT((Wdth-10)/2)

SHOWDIALOG ""
@ Tlr,Tlc HEIGHT Hgt WIDTH Wdth
@ 2,MsgMargin ?? Msg

PUSHBUTTON @ 5,ButtonMargin WIDTH 10
   "Accept"
   OK
   DEFAULT
   VALUE "OK"
   TAG "Yes"
   TO Button

ENDDIALOG

ENDPROC
```

Thanks

Steven Green

unread,
Sep 23, 2025, 1:34:30 PM (11 days ago) Sep 23
to TheDBCommunity
PLAY

M.Emmanuel

unread,
Sep 24, 2025, 3:13:45 AM (11 days ago) Sep 24
to TheDBCommunity
Thanks
Reply all
Reply to author
Forward
0 new messages