This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-11-07 19:27:56

catguy123
Scratcher
Registered: 2010-01-09
Posts: 8

Detecting question marks and exclamation points in user responses.

I'm working on a kind of chatbot that generates its responses based on wether the user is using an exclamation point or question mark at the end of the sentence. Currently I'm using a combination of variables and other techniques that don't work. HALP.


<insert Stupid Unnecessary Quote Here>

Offline

 

#2 2012-11-07 20:18:24

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Detecting question marks and exclamation points in user responses.

Is the user limited to one sentence per response? If yes, then you could just use:

if <(letter (length of (response)) of (response)) = [?]>
 Filler
end
if <(letter (length of (response)) of (response)) = [!]>
 Fillet
end
I hope that this helps!

Last edited by ErnieParke (2012-11-07 20:19:38)


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2012-11-07 21:23:19

catguy123
Scratcher
Registered: 2010-01-09
Posts: 8

Re: Detecting question marks and exclamation points in user responses.

Thanks, that was really helpful!


<insert Stupid Unnecessary Quote Here>

Offline

 

#4 2012-11-07 21:41:51

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Detecting question marks and exclamation points in user responses.

catguy123 wrote:

Thanks, that was really helpful!

You welcome. I'm just trying to help.  smile


http://i46.tinypic.com/35ismmc.png

Offline

 

#5 2013-03-11 17:08:08

Liamadams
Scratcher
Registered: 2012-12-08
Posts: 100+

Re: Detecting question marks and exclamation points in user responses.

how do u get those fill blocks? BYOB?


http://i39.tinypic.com/3309476.jpg

Offline

 

#6 2013-03-11 17:32:47

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Detecting question marks and exclamation points in user responses.

Liamadams wrote:

how do u get those fill blocks? BYOB?

Those aren't blocks at all. They're just there to take up the space and say, "There's something here, though it's what you want/already have."

With regards,

ErnieParke

Last edited by ErnieParke (2013-03-11 17:32:56)


http://i46.tinypic.com/35ismmc.png

Offline

 

#7 2013-03-14 20:34:36

Liamadams
Scratcher
Registered: 2012-12-08
Posts: 100+

Re: Detecting question marks and exclamation points in user responses.

ErnieParke wrote:

Liamadams wrote:

how do u get those fill blocks? BYOB?

Those aren't blocks at all. They're just there to take up the space and say, "There's something here, though it's what you want/already have."

With regards,

ErnieParke

yay


http://i39.tinypic.com/3309476.jpg

Offline

 

Board footer