Searching a textbox for a word

Get help using Construct 2

Post » Wed Apr 06, 2016 1:10 am

Hey, basically I'm trying to get a textbox to search itself for a word, and if it's there, the event proceeds. I looked on other forums and people suggested find(text.text,"yourword"), but using this on a compare text condition for a textbox object (instead of just Text) it comes up with the "yourword" being a parameter that requires a string, not a number. Surely this is a string? Perhaps I'm missing or something, or maybe this does not work on textbox objects. Any ideas?
B
10
S
2
G
1
Posts: 36
Reputation: 707

Post » Wed Apr 06, 2016 7:01 am

Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Wed Apr 06, 2016 12:29 pm

Message: mongoose665 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
MadSpy wrote:https://www.scirra.com/forum/how-do-i-search-text-on-a-page_p1027535?#p1027535

Ah man that looks useful, thank you, but I've spent the last hour trying to even figure it out, let alone apply it somehow to my own project. I guess I'll just have to leave it and find another way around it
B
10
S
2
G
1
Posts: 36
Reputation: 707

Post » Wed Apr 06, 2016 2:51 pm

mongoose665 wrote:Hey, basically I'm trying to get a textbox to search itself for a word, and if it's there, the event proceeds

If I understand correctly..you only need Yes(it's there) or No(there's no such word.. )

Image

findWords.capx
Image
B
65
S
23
G
7
Posts: 1,501
Reputation: 10,888


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests