How to get current selected line as text without keybind hacks

I have above KM macro and I want to make this part:

Into something that is efficient and does not use these hacks.

Basically given this state:

it will put do thing into clipboard (current line I am on)

as current approach has too much delay :crying_cat_face:

One approach might be a variant of:

const doc = Application("Bike").documents.at(0);

return doc.exists()
    ? doc.export({
        from: doc.selectionRow(),
        all: false,
        as: "plain text format"
    })
        .trim()
    : "";

as in:

BIKE - Copy current line as plain text.kmmacros.zip (1.6 KB)

1 Like

this is perfect
thanks :heart:

1 Like

See also:

1 Like