as some remember, we had a tool before that ripped the code from posts that gave it in proper format instead of the screwed way IE it presents.
well, now I have got 2 new chapters to this story. as we know, still not everyone uses PostPrep. what the heck, so many does not still after 10 times of saying still can't post with code-tags.
so, here are they. 1st is a "plugin" for checker. version independent. if you know just about something... well, if you know how to make button on form and make the onclick event, this one will fire with it:
simple explanation of how it works. you select text on topic and click copy. then go to checker and fire this udf with the button you needed to create. after that (yes, immediately) you can open your favorite editor (which most likely is notepad) and vóila, it's there, with correct layout.
then the second one. it's not even kix so not sure should I post it, but anyways. you need to save this scriptlet as html on your HD:
the commented out line will most likely make your browser ask do you want to let my scriptlet destroy your government. if you don't mind it, you can just remove it and enjoy the clipboard copy. otherwise you need to copy it from the window script opens. then, for this script to fire... write into (yes, you can feel smart by writing different keyname):
the first will make the menuitem. second will make it show only when text-selected. if you leave it out, you might know why I added it there. so, use just as you wish.
was not gonna post these but wasted about 12 hours of sleeping time, so think I need to. hope someone will find these usefull. I bet that at least some requlars will.
[ 30. September 2003, 09:49: Message edited by: Lonkero ]
k, new update. the layout was screwed (just like when you copy-paste to wordpad) so needed to fix it. the html file for codeparser-menuItem with correct layout is as follows:
<SCRIPT LANGUAGE="JavaScript" defer> var parentwin = external.menuArguments; var doc = parentwin.document; var sel = doc.selection; var rng = sel.createRange(); var str = new String(rng.text); str = str.split('\n'); str = str.join(''); str = str.split('<br />'); str = str.join(' '); var codeparser=open("","CodeParser","toolbar=no,menubar=yes,scrollbars=yes",true); codeparser.document.write('<html><head><title>CodeParser Lite by Lonkero</title></head><body><pre>'); codeparser.document.write(str); codeparser.document.write("</pre></body></html>"); <!-- rng.execCommand("Copy")--> </SCRIPT>
ps, didn't need before but copy&paste of new UDF's do require me to build the lib again and doh, that's a pain.
This code of cousre is all screwed when I try to copy it into notepad. So I ran the function you posted above and re-pasted and it is still all screwed. It didnt seem to change it at all. I know the function is running cause I put a messagebox inside to tell me when it runs.
#76926 - 2004-02-1104:58 PMRe: 2 different bbCodeParser Lite versions
ShaneEPShaneEP MM club member
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I thought you said the checker version didnt matter?
Quote: 1st is a "plugin" for checker. version independent.
I know the link I posted has nothing to do with your code. I just used it as an example. I should be able to copy the code form the link and the parser should fix it so I can paste it into notepad right? If not then what is the point of the parser. Im obviously missing something.
#76927 - 2004-02-1105:06 PMRe: 2 different bbCodeParser Lite versions
ShaneEPShaneEP MM club member
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Added this to the menu of BBChecker - Adain 0.2.2...
Code:
$.SmenuPL=$.Smenu.menuitems.add("Parse Code From Clipboard") $.SmenuPL.onclick="bbCodeParserLite()"
Added this to the bottom of the code...
Code:
function bbCodeParserLite() dim $,$!,$_,$2 $=$m.controls.richtextbox(,$m.width,0,0,0) $2=$m.controls.textbox(,$m.width,0,0,0) $.hide $2.hide $2.multiline=1 $.paste $!=split($.text,chr(13)) for $_=1 to ubound($!) $![$_]=split($![$_],chr(10)) $![$_][0]="" $![$_]=join($![$_],"") next $2.text=join($!,@crlf) $2.selstart=0 $2.sellength=-1 $2.copy endfunction