!S XMAKHTML !O MAKEHTML !L T00,E !R CED ! !------------------------------------------------------------------------------- ! ! This program shows how to create an HTML file. First, the program creates a ! text file named SAMPLE.HTM. Then the program writes HTML tags to the text ! file, followed by several lines of data, and ends with the closing HTML ! tags. Then, the program launches the HTML document, waits for 6 seconds, and ! erases SAMPLE.HTM. ! !------------------------------------------------------------------------------- ! SET TempDir$ = "TMP" ! temp directory ! !------------------------------------------------------------------------------- ! LENGTH 12 & LOCAL FILENAME$ ! 8.3 filename LENGTH 3 & LOCAL DIR$ ! directory name LENGTH 1 & LOCAL FLAG$ ! flag LENGTH 80 & LOCAL HTMLDOC$ ! HTML document name + path LENGTH 80 & LOCAL REMOTEDOC$ ! remote HTML document name ! !------------------------------------------------------------------------------- ! FILENAME$ = "SAMPLE.HTM" ! HTML document name DIR$ = TempDir$ ! directory name CREATE FILENAME$,DIR=DIR$ ! create the file ! OPEN (20) FILENAME$,DIR=DIR$ ! open the file ! PRINT (20) "" ! print initial HTML tags PRINT (20) "" PRINT (20) "" PRINT (20) "Sample title line" PRINT (20) "" PRINT (20) "" ! PRINT (20) "" ! print BODY tag ! PRINT (20) "
"                                    ! print PRE tag
!
PRINT (20) "This is some sample data."
PRINT (20) "Here is another line of sample data."
PRINT (20) "Here is a third line."
!
PRINT (20) "
" ! print closing tags PRINT (20) "" PRINT (20) "" ! CLOSE (20) ! close the file ! HTMLDOC$ = PATH(DIR$) + FILENAME$ ! construct document name ! FLAG$=SUB(DSTAT(TERM$),21,1) ! check CometAnywhere byte ! IF SUB(BINARY(FLAG$),8,1) NE "1" THEN GOTO LAUNCHFILE ! CA session? ! REMOTEDOC$="$(CATOOLS)\HTMLTEMP\"+FILENAME$ ! construct remote filename ! PRINT(0) (VerifyFile=HTMLDOC$,REMOTEDOC$,24) ! transfer file to remote ! HTMLDOC$ = REMOTEDOC$ ! move remote file name ! LAUNCHFILE: PRINT (0) (LAUNCH=HTMLDOC$) ! launch HTML document ! PAUSE (108) ! wait 6 seconds ERASE FILENAME$,DIR=DIR$ ! erase HTML document ! RUN "QMONITOR" END