Copy Text to Clipboard

Get help using Construct 2

Post » Thu Sep 27, 2012 11:10 am

Hi,

Is there a way to copy text to the clipboard?
B
35
S
12
G
6
Posts: 111
Reputation: 7,087

Post » Thu Sep 27, 2012 1:26 pm

Like in a text box?
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Fri Sep 28, 2012 9:45 am

Yes. Any solution Would Be Helpful. Thanks.
B
35
S
12
G
6
Posts: 111
Reputation: 7,087

Post » Sat Sep 29, 2012 1:04 am

Anyone? There's no way to do such a thing?
B
35
S
12
G
6
Posts: 111
Reputation: 7,087

Post » Sat Sep 29, 2012 3:17 am

The Manual.

You can use the text expression, found at the bottom of this page.

Will that work?teahousemoon2012-09-29 03:19:38
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Post » Sat Sep 29, 2012 8:15 am

Where did you see an expression/function which takes a text and store it into the clipboard? I failed to find such option.
B
35
S
12
G
6
Posts: 111
Reputation: 7,087

Post » Sat Sep 29, 2012 10:11 am

You can copy text in a text box like normal...
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Sat Sep 29, 2012 1:30 pm

I'm talking about in run-time, not in edit mode.

I wish to create text, in any text form or object and than the surfer/user presses a button named "copy" and the text will be copied to the clipboard allowing him/her to paste it into notepad, browser form, Word or any other text oriented target.

Hope this makes more sense.
B
35
S
12
G
6
Posts: 111
Reputation: 7,087

Post » Sat Sep 29, 2012 7:13 pm

Setting the clipboard seems to not be permitted from javascript. However with a google search I found some solutions using flash:
http://www.deluxeblogtips.com/2010/06/javascript-copy-to-clipboard.html
So you'd have to make a plugin to use it.
B
79
S
24
G
53
Posts: 4,732
Reputation: 40,227

Post » Sat Sep 29, 2012 8:22 pm

[QUOTE=HotGod] Where did you see an expression/function which takes a text and store it into the clipboard? I failed to find such option.[/QUOTE]

"Text
Return a string containing the object's current text."

That is what I was referring to. I know it's not the clipboard, per say, but it is a means of gaining access to the text and reusing it. Is that not adequate?
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Next

Return to How do I....?

Who is online

Users browsing this forum: Artpunk, NRABrazil, PixelatedTrip and 27 guests