// // ClipCatch.vdm Ch. Ziemski 29.09.2003 // 29.01.2004 // // Observe and get the Windows Clipboard in an endless loop: // // When ClipBoard is no longer empty, the text from there is inserted // into the current buffer at cursor position and ClipBoard is emptied. // // You can stop the loop with Ctrl-C. // // So you can collect text snippets from here and there in a single place. // //------------------------------------------------------------------------- // // This macro requires VEDIT 6.12 due to the enhanced Clip_Copy_Block(). // //------------------------------------------------------------------------- #104=1 // 0 = insert exactly like copied into the ClipBoard. // 1 = let every paste begin at Begin_Of_Line Repeat (ALL) { #105=Win_Num // The message must be inside the loop: otherwise Win_Switch(STATLINE) // an overlapping window would delete the message. Win_Color(79) Win_EoL Message(" Catching contents of the ClipBoard and inserting it here. Quit with ") Win_Switch(#105) if (#104 && ! At_BoL) { EoL Ins_Newline() } Clip_Ins() // get ClipBoard (if any contents) and insert it at Cur_Pos if (#104 && ! At_BoL) { EoL Ins_Newline() } Update Clip_Copy_Block(0,0) // empty ClipBoard for next looping Sleep(3) }