Copy an attributes value to the clipboard

Silly question, but I’m not up on the command line as much as I’d like to be. I want to run a stamp that performance some transformation and then copies the values of an attribute or the variable holding my target values to the clipboard. A simple example, I meant to copy the values of $EmailSet to the clipboard using a stamp. How would this be done?

Not sure whether you need the export LANG part (but I need it to get correct umlauts).

runCommand("export LANG='en_US.UTF-8' && pbcopy", $EmailSet)

Thanks! Perfect.

BTW, is the runCommand the best method to perform this operation? I just guessed that it was.

AFAIK it’s the only method.

1 Like

Yes. It is the only method provided to ‘talk’ from action code to the Mac’s Unix environment.

You could use AppleScript but that adds further complication.

For those of us who don’t use it a lot, terminal and command Line tools will always be a bitcomplex to understand. But, on the upside, once you have the right ‘magic incantation’ (command line!) all should work reliably. Happily the community here has folk who do understand this who tend to jump in and help with these things (thanks @Pete ). User communities FTW!

2 Likes

Perfect, thanks.

Agreed.

1 Like