MAIN\DEMO.DBT ·
DBT ·
3 KB ·
1988-08-11 ·
from PCPlus_Issue-25_Oct-1988
; Demonstration Shell
;
; (C) Duncan P Charlton 1988
CLEAR
SET DOSVAR ""
GOSUB "PeasyDos"
;--------------------------------------------------------------
; Main menu of the shell
:MAINLOOP
CLEAR
@ 80 25
MESSAGE "Select Choice from menu"
SET MVAR MENU "DosCmd" : "Execute a normal DOS command",
"Dir" : "Directory command",
"PeasyDos" : "Show PeasyDos info",
"License" : "Show PeasyDos license",
"Quit" : "Exit from the shell"
ENDMENU
MESSAGE ""
@ 0 0
IF MVAR $<>"ESC" GOSUB MVAR
GOTO "MAINLOOP"
;--------------------------------------------------------------
; Dos command subroutine -illustrates use of EDIT and SHELL commands
; Note that DOSVAR is used as the default in the EDIT command, this
; means that the previous Dos command will allways appear as the default
:DosCmd
MESSAGE "Type in DOS command and press <RETURN>"
SET DOSVAR EDIT DOSVAR 60
IF DOSVAR $<> "ESC" SHELL DOSVAR
MESSAGE ""
RETURN
;--------------------------------------------------------------
; Directory subroutine - illustrates use of sub menu to set command
; line options
:Dir
MESSAGE "Select Short or Long Format"
SET DVAR1 MENU "Long" : "Long directory listing",
"Short" : "Short directory listing"
ENDMENU
MESSAGE ""
IF DVAR1 $= "ESC" RETURN
SET DVAR2 "DIR "
IF DVAR1 $= "Short" SET DVAR2 DVAR2 & " /W "
SHELL DVAR2
RETURN
:PeasyDos
@ 0 5
DISPLAY
"Welcome to PeasyDos, the programmable DOS shell"
@ 0 7
DISPLAY
"With PeasyDos you can replace the DOS prompt with your own menu-driven shell"
@ 0 9
DISPLAY
"Because PeasyDos is programmable you can include as many, or as few features"
DISPLAY
"as you like. Shells can be created for every level of user, from the novice"
DISPLAY
"who needs only to run a few applications, to the power user who needs access"
DISPLAY
"to every aspect of DOS."
GOSUB "PAGE"
@ 0 5
DISPLAY
"Here are just some of the ways that you can use PeasyDos:"
@ 0 7
DISPLAY
" - Running application programs"
DISPLAY
" - Automating backup procedures"
DISPLAY
" - Setting printer options"
@ 0 11
DISPLAY
"The menu and string handling commands in the PeasyDos programming language"
DISPLAY
"mean that you can even select command line options and switches through"
DISPLAY
"menus."
GOSUB "PAGE"
@ 0 5
DISPLAY "What follows now is a small demonstration shell, the PeasyDos"
DISPLAY "program that produces is it is in a file called DEMO.DBT."
GOSUB "PAGE"
RETURN
;--------------------------------------------------------------
:License
LICENSE
RETURN
;--------------------------------------------------------------
:Quit
SET QVAR MENU "Yes" : "Exit to DOS",
"No" : "Cancel Quit"
ENDMENU
IF QVAR $= "Yes" EXIT
RETURN
;--------------------------------------------------------------
:PAGE
MESSAGE "Press any key to continue"
SET DUMMY NEXTKEY
CLEAR
RETURN
END