Copying to the clipboard

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Alistair
Posts: 33
Joined: Mon Jun 23, 2008 6:45 am
Location: Victoria University

Copying to the clipboard

Post by Alistair » Thu Sep 18, 2008 6:48 am

I am trying to copy data to the clipboard. I have tried using the following but without success:

copy line 4 to 4+datagrabbed of cd fld "pathData"

I then tried simplifying the script but still no success. The dictionary explanation of the Copy command seems quite straightforward so I'm perplexed that nothing I try results in text being transferred to the clipboard. What am I missing?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Sep 18, 2008 9:13 am

Hi Alistair,

There are two ways to do this.

Code: Select all

select line 4 of fld "Your Field"
copy
or

Code: Select all

set the clipboarddata["text"] to line 4 of fld "Your Field"
Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Alistair
Posts: 33
Joined: Mon Jun 23, 2008 6:45 am
Location: Victoria University

Post by Alistair » Wed Sep 24, 2008 1:21 am

For some reason I wasn't able to get the first option to work but the second option achieved just what I wanted, so thanks.

Post Reply

Return to “Mac OS”