ok, how about this...
"BB code parser" ? ; Put together by Lonkero 16.8.2001 ;script requirement: kix2001 RC-1 or newer
"you give topic to parse and I give you the clean code parts of the topic." ? ? " Press some keys to get you going..." get $ cls "so what topic you want to get?" ? "(easiest is to copy the address from IE addressbar and paste it to this window)" ?< font color=#4682B4> " -->" gets $page if instr($page,"http://kixtart.org/cgi-bin/ultimatebb.cgi?") $httpObj = createobject("winhttp.winhttprequest.5") if vartype($httpObj) <> 9 ? "failed to start Winhttp, press any key to quit..." get $ exit else "WinHTTP started" endif $httpObj.open("GET",$page) ? if @error "failed to Initialize Winhttp ( error:@serror ), press any key to quit..." get $ exit else "WinHTTP initialized" endif ? ? "transferring topic..." $httpObj.send() $ = open(1,"%temp%\bbdecodec.tmp",5) $crlf = chr(13)+chr(10) $c = 0 $data = $httpObj.Responsetext $x = instr($data,">code:</font><HR><pre>") ? "parsing it..." while $x <> 0 $c=$c+1 $data = substr($data,$x+22,len($data)-($x+21)) $x = instr($data,"</pre>") - 1 $post = substr($data,1,$x) $ = writeline(1,"---------------- code #$c ----------------"+$crlf) for each $section in split($post,"<P>") for each $line in split($section,"<BR>") $ = writeline(1,$line+$crlf) next next $ = writeline(1,"------------------ end -------------------"+$crlf+$crlf) $x = instr($data,">code:</font><HR><pre>") loop $ = close(1) run "notepad %temp%\BBdecodec.tmp" cls sleep 3 del "%temp%\bbdecodec.tmp" else cls "You didn't give kixBB url-address. This script supports only BB found at kixtart.org!" get $ endif exit
|
[ 30. January 2003, 16:27: Message edited by: Lonkero ]
_________________________
!download
KiXnet