Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Block comment and uncomment code
functions to comment and uncomment blocks ';|' is used as comment char instead of a single ';' to distinguish it from other uses. the trick is to place a ';|' in front of the block, then replace all CRLF's with CRLF+';|' except the one eventually at the end of the block _Block Comment \ ^!C WedCut() cmt = ';|' rpstr = strCat(@CRLF,cmt) size = BinaryClipGet(0,1) bb1 = BinaryAlloc(size) BinaryClipGet(bb1,1) bb2 = BinaryAlloc(size+100) nb = BinaryPokeStr(bb2,0,cmt) nn = BinaryCopy(bb2,nb,bb1,0,size-1) BinaryReplace(bb2,@CRLF, rpstr, @TRUE) eod = BinaryEodGet(bb2) nn = BinaryCopy(bb2,eod,bb1,size-1,1) BinaryClipPut(bb2,1) BinaryFree(bb1) BinaryFree(bb2) WedPaste() Block Uncomment \ ^!V WedCut() cmt = ';|' size = BinaryClipGet(0,1) bb1 = BinaryAlloc(size) BinaryClipGet(bb1,1) BinaryReplace(bb1,cmt,'', @TRUE) BinaryClipPut(bb1,1) BinaryFree(bb1) WedPaste()
Article ID: W14753
Filename: Block comment and uncomment code.txt
File Created: 2000:06:23:08:16:20
Last Updated: 2000:06:23:08:16:20