Simpler Copy to clipboard command

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Posts: 5
Joined: Mon Oct 28, 2013 1:23 pm

Simpler Copy to clipboard command

Post by TorstenHolmer » Thu Mar 01, 2018 3:47 pm


I want to make a recommendation:

I just wanted to put the text of a variable into the clipboard and wondered what is the reason, that:

copy tText into clipboard

does not work.

The "correct" way: set the clipboardData["text"] to tText is IMHO a harsh distraction from the english language style Livecode is proposing ;-)


VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6436
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles

Re: Simpler Copy to clipboard command

Post by FourthWorld » Thu Mar 01, 2018 3:59 pm

If you're dealing with selected text (or even objects) the command is simply "copy". Couldn't get simpler.

But if you want to programmatically alter the clipboard without user intervention, that much less common use case requires less common syntax.

The reason for the array is that the range of ways in which a programmer might want to work with the clipboard can be quite vast, and clipboard structures provided by the OS are somewhat complex.

Indeed, even the most complicated LiveCode syntax for directly manipulating clipboard contents across platforms is far simpler than the OS APIs for any one of them.

An array variable is more complex than a simple string, but programming isn't natural language, and arrays are a very useful structure commonly available in nearly every programming language for their efficiency and utility.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems:
LiveCode User Group on Facebook :

Post Reply

Return to “Feature Requests”