HTML Processing
We can embed the AutoScript into HTML files. Then, we process those HTML files by calling the html_processfile procedure.
Here is an initial HTML file (HISTORY.HTM) with AutoScript in it. After the processing, we produce a new file (the final HTML file) _HISTORY.HTM.
Note here that the standard procedure message outputs to the final HTML file when used in HTML files.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN“>
<html>
<head>
<meta http-equiv=Content-Language content=el>
<meta http-equiv=Content-Type content=“text/html<B><FONT COLOR=“#B00040“>,</FONT></B> charset=iso-8859-7“>
<?kcode
{............................................................ activities
for today}
title0 = strcat
(“Activities at : “
,crDate
)
title1 = “Day“
title2 = “Hour“
title3 = “User“
title4 = “Activity“
title5 = “Table“
title6 = “Recodr Id“
call message
(““
)
call message
(““
)
call message
(“
“,title0,“
“
)
call message
(“
“)
call message(““)
call message(““,title1,“ | “)
call message(““,title2,“ | “)
call message(““,title3,“ | “)
call message(““,title4,“ | “)
call message(““,title5,“ | “)
call message(““,title6,“ | “)
call message(“
“)
start_sql “DATA11“ “KOSMOS“
SELECT
AU_HISTORY.DAT, AU_HISTORY.TIM, AU_HISTORY.USR,
AU_HISTORY.OPERATION, AU_HISTORY.TBL, AU_HISTORY.RECORDID
FROM
AU_HISTORY
ORDER BY
AU_HISTORY.DAT, AU_HISTORY.TIM,
end_sql
call RunEmbSQL(“DATA11“)
q = QueryByName(“DATA11“)
rcount = TRecordCount(q)
call TFirst(q)
for i = 1 to rcount
param1 = TGetFld(q,“DAT“)
param2 = TGetFld(q,“TIM“)
param3 = TGetFld(q,“USR“)
param4 = TGetFld(q,“OPERATION“)
param5 = TGetFld(q,“TBL“)
param6 = TGetFld(q,“RECORDID“)
call message(““)
call message(““,param1,“ | “)
call message(““,param2,“ | “)
call message(““,param3,“ | “)
call message(““,param4,“ | “)
call message(““,param5,“ | “)
call message(““,param6,“ | “)
call message(“
“)
call TNext(q)
next
call FreeEmbSQL(“DATA11“)
?>
</TABLE>
</BODY>
</HTML>