How do I replace words by others

Get help using Construct 2

Post » Mon Apr 03, 2017 7:37 pm

hi in my app im doing this i have two objects

the first object is the text box and the second object is the multiline box.

how to replace words inside the multiline box for example i want to replace all the present # by ++ how can i achieve that?

also in my text box, when y type a specific typo like this '+ i would like to replace ALL the ' present in the multiline box by " how can i achieve that?


thanks
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Tue Apr 04, 2017 7:53 am

so what im trying to achieve is in the text box i put some word, if the word match to a word i decided, then he set the text inside the multilien box to some text.
but HOW to do this, in my text box if i write '+
i would like inside the multiline box it change every ' by ".
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Tue Apr 04, 2017 4:50 pm

can someone help with this problem?

thanks
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Tue Apr 04, 2017 11:41 pm

B
25
S
11
G
9
Posts: 136
Reputation: 6,657

Post » Wed Apr 05, 2017 3:51 am

Thanks :D this works great but if i have a full text, where i want t replace every ' by " how can i do that?? :D

for example i have:

<!doctype html>
<html lang='fr'>
<head>
<meta charset='utf-8'>
<title>Troll Code Test</title>
<link rel='stylesheet' href='style.css'><p>texte</p>
<script src='script.js'></script>
</head>
<body>


and i would like to have :

<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Troll Code Test</title>
<link rel="stylesheet"href="style.css"><p>texte</p>
<script src="script.js"></script>
</head>
<body>
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Wed Apr 05, 2017 9:58 am

you example gives some crashes, when i add a text and then i just add a character inside "with this value" the app replace all my text...and slow down...
Last edited by imothep85 on Wed Apr 05, 2017 11:52 am, edited 1 time in total.
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612

Post » Wed Apr 05, 2017 11:35 am

Yea sorry, forgot to add a check for when it's empty

So this is what you want?
Image

Here's the updated version: http://www.wishy.eu/replace.capx
B
25
S
11
G
9
Posts: 136
Reputation: 6,657

Post » Wed Apr 05, 2017 11:54 am

yeaaaaaaaaaah :D thank you so much :D
if i can help you, im good at graphics :D
B
37
S
15
G
7
Posts: 1,680
Reputation: 9,612


Return to How do I....?

Who is online

Users browsing this forum: sean080 and 21 guests