Way to tell if clipboard has column-block in it before pasting?
Is there a way to tell if clipboard has column-block in it without actually pasting? I’m speaking in a Pythonscript context…can I tell before I do an editor.paste() function call if what I will be pasting is something that was a column-block selection at the point it was copied to the clipboard?
more or less - depends what exactly should be done.
What comes first into my mind is using editor.selectionIsRectangle.
If it returns True it is column mode but this of course means the selection is
If this doesn’t answer your question you may provide more infos how your script
should work exactly.
Thank you for your reply. I was thinking in terms of possibly the selection being made some time ago, i.e., not currently active, maybe there is another selection currently active for drag-and-drop movement purpose…the point is, nothing has been copied to the clipboard since the column block was. So the column block is still there, and N++ knows it…but can I also know it from my script somehow?
actually I think npp doesn’t know it but scintilla does.
In theory you should be able to do it
- Install a clipboard watcher (ctypes and windows api required)
- whenever clipboard data changes, check if selection was rectangle
But I still don’t get the point why it is necessary to do it as scintilla is handling it for you.