On 31/12/2020 01:09, James Richters via fpc-pascal wrote:
I'm trying to write a programs to get data from the windows clipboard that
was put into it with Notepad++ using vertical editing.

Just for Info, SynEdit (trunk) can handle notepad++ column selection

See the code at.
There are 2 common formats (and as a 3rd the one used by SynEdit).
NP++ uses one of them, not sure which.

components\synedit\syneditmiscclasses.pp
 TSynClipboardStream = class
    class function ClipboardFormatMSDEVColumnSelect: TClipboardFormat;
    class function ClipboardFormatBorlandIDEBlockType: TClipboardFormat;

IIRC in both cases the text is in the normal ClipBoard.AsText. Each line is one column segment.

'MSDEVColumnSelect' acts as a flag if present.
'Borland IDE Block Type' has a single byte. the value $02 indicates column mode.

Register the format, to get the ID, then check if it is on the clipboard.

Either check the synEdit source, or google the 2 format names....
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to