// // NEXTWORD2CLIP.VDM C.Z. 16.11.2001 // // // This macro steps through a list like that: // // ACHILLES Italy ... // ALBRECHT USA ... // GERSHWIN Japan ... // ... ... // // working on a column(!) of words. // // It begins at cursor position, reads the word from there on and copies it // into the windows clipboard. // Then a dialog window pops up and asks the user to switch to his other // application and to insert the clipboard. // Coming back to VEDIT the user just has to press ENTER (or click [next]) // to copy the next word into the clipboard. And so on... // // Example: // Assuming the cursor at the beginning of "ACHILLES" in the above list // the macro will put the words ACHILLES ALBRECHT GERSHWIN one after another // into the clipboard. // // To do: // If there will be a command Send_Key() in a further version of VEDIT the // macro can be made more a robot... // // Num_Push(98,99) Reg_Push(99,99) #99 = Cur_Col // remember Cursor Column while(! AT_EoF){ Block_Begin(CLEAR) Goto_Col(#99) // and position at the same cursor column as before Block_Begin(Cur_Pos) // mark a block from here up to Search("|x", NOERR) // the end of the word if(Error_Match){ // if there is no CR/LF in the last line EoF // goto end of file } Block_End(Cur_Pos) // Clip_Copy_Block(Block_Begin, Block_End) Line(1, NOERR) // goto next line (if any) Update // show it to the user #98=Dialog_Input_1(99,"`Action required`, `The marked entry is copied to the clipboard`, `Please switch to your app and insert the clipboard.`, `Then come back ...`, `[&Next]`,`[&Cancel]`",SET+APP+CENTER,0,0) if(#98 != 1) { break } } Reg_Pop(99,99) Num_Pop(98,99)