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

#1 2009-11-29 12:27:08

theapproom
Scratcher
Registered: 2009-08-24
Posts: 38

I need help on making a scratch word processor?

I need help on making a scratch word processor for my scratch OS. I have a icon that you click on and a white page like thing to type the words on, but how do you make it possible to right in the white space only??

Offline

 

#2 2009-11-29 17:05:03

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: I need help on making a scratch word processor?

I'm no expert on this, but I have an understanding.
you will need the variable "characternum" or something else that makes sense to you for the character number. for each sprite you will need costumes for each letter, number, or punctuation mark you will use.
here's where the programming starts.
[blocks]
each sprite will need this script.
<when green flag clicked>
<forever>
<if><( <{ characternum }> <=> (character's number goes here)>
<if><key[ a ]pressed?>
<switch to costume[ a ]>
<change{ characternum }by( 1
<stop script>
<end>

then you will need that same script for each letter, number, and punctuation mark you need.
more to come. I need a break so i can think a bit.

P.S. I can't wait until it comes out!

Last edited by 16Skittles (2009-11-29 17:05:43)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#3 2009-11-29 17:36:04

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: I need help on making a scratch word processor?

Don't put stop script.


Hai.

Offline

 

#4 2009-11-29 18:52:12

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: I need help on making a scratch word processor?

true. here's part two.
                                                      Spacebar
   This is very simple.
[blocks]
put this on the stage.
<when[ space ]key pressed>
<change{ characternum }by( 1 ) 
[/blocks]
p.s. weird... when the text is in the

Code:

 [blocks]

blocks, it gets turned [blocks] bold [/blocks]
Edit: or maybe not...

Last edited by 16Skittles (2009-11-29 18:53:01)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#5 2009-12-02 16:29:18

amberk99
Scratcher
Registered: 2009-11-01
Posts: 39

Re: I need help on making a scratch word processor?

ok listen,  smile  its easier than that! here's the EASY WAY. [blocks]<key[ space ]pressed?>[/blocks] [blocks]<point in direction( 90[/blocks] [blocks]<move( 10 )steps>[/blocks] erase is the same except left arrow and -90. [blocks]<key[ a ]pressed?>[/blocks] [blocks]<switch to costume[a[/blocks] [blocks] <wait( 0.2 )secsc>[/blocks] [blocks]<switch to costume[blank[/blocks]


Click!
Think. Before. Doing. <-My Motto ^_^

Offline

 

#6 2009-12-02 19:00:46

NiteHaunt
Scratcher
Registered: 2009-11-21
Posts: 39

Re: I need help on making a scratch word processor?

I would tell you a secret to it if only you posted this in ALL ABOUT SCRATCH.Not ADVANCED TOPICS!

<play sound[  ]and waits>

Offline

 

#7 2009-12-29 09:28:44

pumacat4000
Scratcher
Registered: 2009-12-07
Posts: 3

Re: I need help on making a scratch word processor?

I tried those ways and it didn't work. I tried a different way, but it typed each number a few times. Can someone try this and try to fix it?

[blocks]<when green flag clicked>
<forever>
<if><key[ a ]pressed?>
<switch to costume[a]>
<stamp>
<end>
<if>
<(  <=> )>
<go to x sad   )y sad  ((  <+>  )))
<end>[/block]

The blank spaces in the operators are x- and y- positions of sprite one (letter key). The second "if" goes to the next line after it reaches a specific point at the end of the screen. I didn't know the exact x- position, so I just left that blank as well. It pretty much worked, but like I said, it would stamp each letter more than once.

Offline

 

#8 2009-12-30 10:46:10

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: I need help on making a scratch word processor?

pumacat4000 wrote:

I tried those ways and it didn't work. I tried a different way, but it typed each number a few times. Can someone try this and try to fix it?

[blocks]<when green flag clicked>
<forever>
<if><key[ a ]pressed?>
<switch to costume[a]>
<wait until> <<  <not><key[ a ]pressed?>  >>
<show>
<stamp>
<hide>
<move( 20 )steps>
<end>
<end>[/block]

The blank spaces in the operators are x- and y- positions of sprite one (letter key). The second "if" goes to the next line after it reaches a specific point at the end of the screen. I didn't know the exact x- position, so I just left that blank as well. It pretty much worked, but like I said, it would stamp each letter more than once.

you need that script.

Last edited by 16Skittles (2009-12-30 10:47:43)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#9 2010-01-02 11:53:29

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: I need help on making a scratch word processor?

What I would recommend is to store everything in a list.
This way, it is easy append, insert, copy, paste delete, etc text.
Then, you can just update the screen whenever you need.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

Board footer