Closed kevjustice closed 2 years ago
selectedItemData()
would only return data of the items selected before the command is executed - selectItems()
won't affect it.
You could use something like the following instead:
const sel = ItemSelection().selectAll();
const texts = sel.itemsFormat(mimeText).slice(0, 10);
for (const text of texts) {
...
}
I am trying to export the top 10 clips from the clipboard into a text file that can be read by MATRIC (an android dashboard for Windows). Here's what I've got so far but I'm missing something on how to reference the correct items.
The goal output is something like:
1: somecopied text 2: some really long ... 3: //image// <=note I have not added code for this yet 4: 123456 etc to 10