'===========================================================================
' Subject: EASY MCI CODES                     Date: 08-09-97 (01:38)       
'  Author: Jason Lashua                       Code: QB, QBasic, PDS        
'  Origin: irox@gte.net                     Packet: TEXT.ABC
'===========================================================================
' easy MCi codes.. v1.o
'
'   well, i never understood how to make mci codes..
'  and then just realized its sooo easy, and you can learn too
'  if you plan to write a bbs or a door or something :P
'
'  just type mci "text .. %mci code.."
'
'  mci codes are preceeded with the percent sign
'  and only have 2 letters. the current codes are..
'
'  ti   display time
'  dt   display date
'  pa   wait for keypress
'  cr   go to start of next line
'  te   print the text all over again from the mci procedure
'  cl   clear screen
'
DECLARE SUB mci (text$)
CLS
'
' the codes %ti and %dt print the time and the date..
'
mci "the time is %ti and the date is %dt"
'
'you can even make up your own codes..
'and what they do, just edit the sub "mci"...
'
LOCATE 10, 1
mci "and this is what i typed.. again.. %cr %te"
mci "%cr%crnow lets go to a new demo. %cr%cr%pa'"
' the %cr code goes down to the next line..
'
' heres a %pa code.. which waits for enter to be pressed..
'
mci "%clheres a recap of all the mci codes..%cr%cr%ti%crtime%cr%dt%crdate%cr%cr%te%cr%crretype the whole input line again..%cr%crand finally, the pause%cr%pa"

SUB mci (text$)
FOR i = 1 TO LEN(text$)
a$ = MID$(text$, i, 1)
IF a$ <> "%" THEN PRINT a$;
IF a$ = "%" THEN
b$ = MID$(text$, i + 1, 2)
'just some samples of what you can make an mci code do
'
'you can add new mci codes too.. like
'if b$="te" then print text$;
'and that'll re print the parms passed to this procedure..
'
IF b$ = "ti" THEN PRINT TIME$;
IF b$ = "dt" THEN PRINT DATE$;
IF b$ = "te" THEN PRINT text$;
IF b$ = "cr" THEN PRINT ""
IF b$ = "pa" THEN INPUT "Press enter to continue", asoeooeeeee
IF b$ = "cl" THEN CLS
i = i + 2
END IF
NEXT i
END SUB
