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

#1 2011-07-03 21:31:16

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

words seperate item in lists

Can someone give me a script that will divide an (answer) into seperate words and then put them on a list as seperate items? It should be able to delete the spaces...


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#2 2011-07-03 21:44:11

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: words seperate item in lists

Hmm, I make no match for a Scratcher like you but I'll try to think about it. ......... okay i think i got it.

make the thing say the answer. then wait for it to finish. Then make a list (variable). Show the list after saying the words. put on the list if you can the words. does it work?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#3 2011-07-03 21:52:20

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: words seperate item in lists

My adventure game does that exact thing.  Link in sig.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#4 2011-07-03 23:17:05

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: words seperate item in lists

BoltBait wrote:

My adventure game does that exact thing.  Link in sig.

I can't find the script  hmm


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#5 2011-07-04 00:08:41

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: words seperate item in lists

It is located in the third script of Sprite 1 and is called ProcessComplexCommand.

The first part of that script cuts the input into words and adds them to a list called "parser".


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#6 2011-07-04 11:35:47

dbmamaz
New Scratcher
Registered: 2011-06-29
Posts: 16

Re: words seperate item in lists

hahaha read it . . . i was curious cuz i had to do a parser years ago in a class . . . uh huh, looking at one letter at a time, discarding spaces and such, and appending each letter to variable to store word in . .. but then you have to compare each word to known words.  Painful. 

(I'm just reading along to gain some basic understanding and help me stay ahead of my kids, without actually making anything myself . . . )

Offline

 

#7 2011-07-04 13:50:51

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: words seperate item in lists

By the way, after writing that parser, I made this suggestion: http://suggest.scratch.mit.edu/forums/6 … fied-token

If you want this function, be sure to vote for it.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

Board footer