home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 January
/
Chip_1999-01_cd.bin
/
zkuste
/
svet_os2
/
HTML_ED
/
HTMLE96B.ZIP
/
AUTODATE.HM
next >
Wrap
Text File
|
1996-07-22
|
904b
|
34 lines
/* .HM Macro to replace a date in the current file with a new date */
starttext = "<!-- AUTODATE -->"
stoptext = "<!-- /AUTODATE -->"
/* disable the editor */
call hmDisableRefresh
/* find the start and stop points for searching for the date */
/* these are so we don't accidentally modify the wrong text */
start = hmFind(starttext,0,,1)
if start=-1 then call notfound
stop = hmFind(stoptext,start,,1)
if stop=-1 then call notfound
/* select the text that will be replaced */
call hmSetSel start,stop-length(stoptext)
/* insert the new date */
call hmInsert date()
/* inform user of success */
call hmStatusSay "Updated AUTODATE!",40
/* exit the macro */
call hmEnableRefresh
exit
/* this procedure is called when one of the expected strings is not found */
notfound: procedure
call hmStatusSay "Couldn't find AUTODATE!",40
call hmEnableRefresh
exit