Hi All,

I'd like to create a macro that's capable of copying an entire Tcl procedure to
the clipboard.  First, a typical Tcl procedure looks like this:


proc myProcedure {arg1 arg2 arg3} {
   body code...
   body code...
   body code...
}


Hmmmm... the board's "code" tags don't seem to retain formatting... 

The logic of the macro would have to work like this:

- First, assume the current cursor position is somewhere within the procedure
I'd like to copy.  Now, from there, I want to start a macro that would have to
work like this...

- Search *backwards* for the string "proc" at the beginning of a line
- Mark the position of the "p" in "proc" as the beginning of the selection
- Now, search *forwards* for the 2nd "{" char
- Use "matching braces" (Ctrl+M) to locate the matching ending brace.
- Mark that location as the end of the selection.
- Select everything between the "p" in "proc" and the closing brace
- Copy it to the clipboard.

Is this possible with PSPad?  Any suggestions or assistance would be
appreciated.

Thanks,

Jeff

-- 
<http://forum.pspad.com/read.php?2,44299,44299>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem