Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: change title html
For a good tutorial on the BinaryTag functions download the HTML DIALOG extender and read the tutorial. Don't actually use that extender, but just understand what the BinaryTag functions are doing in the tutorial.
UseHtmlFile="C:\TEMP\filedata.html" Tempfile="C:\TEMP\filerslt.html" newtitle = "Hello World" bb=BinaryAlloc(100000) BinaryRead(bb,UseHtmlFile) Structure=BinaryTagInit(bb,"") ;BinaryTagInit returns a special value ;that we call a structure. WIL uses the ;structure to keep track of what is ;going on. While 1 ;means loop forever – at least until ;a break statement elsewhere causes the ;exit to the loop structure=BinaryTagFind(structure) ;The BinaryTagFind function instructs WIL ;to locate the next tagged keyword. It ;knows where to start from the information ;passed to it in the structure variable, ;and it saves updated information also in ;the structure variable. if structure=="" then break ;If the structure variable comes back ;from the BinaryTagFind as a null string, ;then no more tagged keywords were found ;and it is time to break out of the ;loop wbdata=BinaryTagExtr(structure,1) ;The BinaryTagExtr function extracts the ;text in between the tags. Leading and ;trailing whitespace is deleted. ;In addition, the 1 option indicates that ;tabs and line terminators should be ;removed and spaces inserted if required. structure=BinaryTagRepl(structure,strCat("")) ;The BinaryTagRepl takes the string and the ;structure variable is updated with new information. Endwhile BinaryWrite(bb,tempfile) ;The BinaryWrite writes out the modified ;HTML file to a tempfile. BinaryFree(bb) ;The memory used by the BinaryBuffer is now returned to the system. exit
Article ID: W15341
File Created: 2002:09:05:13:51:22
Last Updated: 2002:09:05:13:51:22