Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : HLPSYS87.ZIP
Filename : BUILD.PRG

 
Output of file : BUILD.PRG contained in archive : HLPSYS87.ZIP
* BUILD.PRG
* 3/1/87
* Ed Crawford
* Program to build a help file while the application is running by pressing
* the Alt+H key

PARA mprog,mline,mvar
IF mprog='BUILD'
RETURN
ENDIF
message = '[ PROGRAM :'+mprog+' VARIABLE :'+mvar+' ]'

IF LEN(MPROG)<8
MPROG=MPROG+SPACE(8-LEN(MPROG))
ENDIF

M->current=SELECT()
SELE 10
USE help INDEX help
SEEK mprog+mvar
SAVE SCREEN to b_start
IF EOF()
mr1=3
mc1=1
mr2=5
mc2=3
GETCOOR()
APPEND BLANK
REPLACE program WITH mprog
REPLACE variable WITH mvar
REPLACE r1 WITH STR(mr1,2)
REPLACE c1 WITH STR(mc1,2)
REPLACE r2 WITH STR(mr2,2)
REPLACE c2 WITH STR(mc2,2)
ELSE
mr1=VAL(r1)
mc1=VAL(c1)
mr2=VAL(r2)
mc2=VAL(c2)
GETCOOR()
REPLACE r1 WITH STR(mr1,2)
REPLACE c1 WITH STR(mc1,2)
REPLACE r2 WITH STR(mr2,2)
REPLACE c2 WITH STR(mc2,2)
ENDIF
@ mr1,mc1,mr2,mc2 BOX 'Õ͸³¾ÍÔ³ '
@ mr1,(mc1+((mc2-mc1)/2)) - 7 SAY '[ HELP SYSTEM ]'
@ mr2,(mc1+((mc2-mc1)/2)) - (LEN(message)/2) SAY message
REPLACE text WITH TRIM(MEMOEDIT(text,(mr1+1),(mc1+1),(mr2-1),(mc2-1),.T.))

RESTORE SCREEN from b_start
USE
SELECT(M->CURRENT)
RETURN

* UDF GETCOOR
* 3/1/87
* Ed Crawford
* PURPOSE: To input the coordinates for the help window while displaying the
* application's screen.
* Updated 5/26/88 - Due to Summer87's increased screen I/O speed, Nantucket
* makes it possible for us do as much screen writing as this routine does
* and still have a presentable looking screen.

FUNCTION GETCOOR
valid=.F.
BLDMESSAGE('POSITION THE UPPER LEFT HAND CORNER...')
DO WHILE !valid && define the upper left corner
@ mr1,mc1 say '' && show cursor location
INKEY(0) && wait for a key press
DO CASE
CASE LASTKEY()=5 && move cursor up
IF mr1>2
mr1=mr1-1
ENDIF
CASE LASTKEY()=24 && move cursor down
IF mr1<21
mr1=mr1+1
ENDIF
CASE LASTKEY()=19 && move cursor left
IF mc1>1
mc1=mc1-1
ENDIF
CASE LASTKEY()=4 && move cursor right
IF mc1<76
mc1=mc1+1
ENDIF
CASE LASTKEY()=13 && exit loop and save coordinates
valid=.T.
@ mr1,mc1,MR1+2,MC1+2 BOX 'Õ͸³¾ÍÔ³ ' && show upper left corner of the window
ENDCASE
ENDDO
valid=.F.
IF mc2<=mc1 && if you defined the upper column left of the lower column
mc2=mc1+2
ENDIF
IF mr2<=mr1 && if you defined the upper row lower than the lower row
mr2=mr1+2
ENDIF
DO WHILE !valid && now define the lower right corner
restore screen from b_start
BLDMESSAGE('NOW SIZE THE BOX DOWN AND TO THE RIGHT...')
@ mr1,mc1,mr2,mc2 BOX 'Õ͸³¾ÍÔ³ '
INKEY(0)
DO CASE
CASE LASTKEY()=5 && up
IF mr2>mr1+2
mr2=mr2-1
ENDIF
CASE LASTKEY()=24 && down
IF mr2<24
mr2=mr2+1
ENDIF
CASE LASTKEY()=19 && left
IF mc2>mc1+2
mc2=mc2-1
ENDIF
CASE LASTKEY()=4 && right
IF mc2<79
mc2=mc2+1
ENDIF
CASE LASTKEY()=13 && exit and save location
valid=.T.
ENDCASE
ENDDO
RETURN(0)

FUNCTION BLDMESSAGE
PARA STR
SET COLOR TO I,W/N
@ 23,0
@ 23,0 SAY STR
set color to w/n,i
RETURN(0)


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : HLPSYS87.ZIP
Filename : BUILD.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/