Paste text function, exist?

Discussion and feedback on Construct 2

Post » Thu Jul 17, 2014 2:14 pm

Is ther a way to paste clipboard into a textbox without windows shortcuts (ctrl+v)?

like this:
Image
Last edited by rodimus111 on Sat Jul 19, 2014 3:47 am, edited 1 time in total.
B
8
S
1
Posts: 31
Reputation: 571

Post » Thu Jul 17, 2014 2:25 pm

where script zombie?
B
2
Posts: 1
Reputation: 157

Post » Sat Jul 19, 2014 2:40 am

Construct2 doesn't seems to have a code for that. The code in the image is from Multimedia Fusion that indeed can do the thing that I want.
B
8
S
1
Posts: 31
Reputation: 571

Post » Sat Jul 19, 2014 3:03 am

Please use the manual. A simple search with query "clipboard" would have sent you to a node-webkit page manual which states:

ClipboardText
The current text that the user has copied to the clipboard, if any. This allows you to 'paste' the data automatically.

Although this will help you only if your game is meant to run on node-webkit. If you're targeting browsers, there is no viable solution supported across browsers, except IE's

Code: Select all
window.clipboardData.getData('Text')



I've managed to come across this data with two searches, one on manual, one on google, and i've spent 8 minutes of my time on this post in hope that someone will learn to use the resources given to him.

Please use the search function on the manual, forums and google before asking questions.
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,662

Post » Sat Jul 19, 2014 3:41 am

Maybe I did not make myself clear. I need to insert a text from clipboard (or a text of any type) at cursor place pressing a button or some other stuff, not ctrl+v. Something like this:

Image

The problem with set text: "NodeWebkit.ClipboardText" is that it clear all existing text in the box. Theres no function to paste at cursor place or insert the text you want in a given position inside a string.

I searched it more than eight minutes, but I assume that what I need is a too specific feature.
B
8
S
1
Posts: 31
Reputation: 571

Post » Sat Jul 19, 2014 8:01 am

Added to the input plugin. Could insert text at index and compare cursor position (if supported)
B
10
S
2
G
1
Posts: 202
Reputation: 1,545

Post » Sat Jul 19, 2014 4:30 pm

input plugin? Where? Be more specific please.
B
8
S
1
Posts: 31
Reputation: 571

Post » Sat Jul 19, 2014 4:54 pm

B
10
S
2
G
1
Posts: 202
Reputation: 1,545

Post » Wed Jul 23, 2014 1:20 am

Is just what I wanted. Thanks masters!! This really saves me.
B
8
S
1
Posts: 31
Reputation: 571


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests