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

#1 2010-07-09 09:20:01

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

How do you make a word processor?

Hello,
I'm trying to make a Windows XP simulator and I want to add a working word processor that lets you type straight on the window (a white sprite separate from the window itself). How do you do this?
WindozeNT


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#2 2010-07-09 12:15:40

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: How do you make a word processor?

I would make one sprite with 26 costumes (each letter of the alphabet) and you can add numbers too.

Scripting:

Typing Letters (and Numbers):
When you press a button, for example the letter 'E' , change costume to 'letter E' -- Show -- Stamp -- Hide -- change x by (how ever many increments you need between the current letter and the next letter)

Spacing Script:
If key Space is pressed -- change x by (how ever long you want the space to be)

Script that acts as Backspace:
If key 'left arrow ' pressed -- set costume to 'White' (or the color of word processor background) -- change x by (how ever many increments to move back and stamp over a letter) -- show -- stamp -- hide

Hope this helps you out!

Last edited by coka (2010-07-09 12:17:07)


http://i42.tinypic.com/2rot8c2.png

Offline

 

#3 2010-07-09 12:31:31

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How do you make a word processor?

It's quite frivolous, actually, but Coka's post sums it up quite well. I used to try that, but then I realised how utterly difficult it is to do such a thing.

Offline

 

#4 2010-07-12 07:55:49

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

coka wrote:

I would make one sprite with 26 costumes (each letter of the alphabet) and you can add numbers too.

Scripting:

Typing Letters (and Numbers):
When you press a button, for example the letter 'E' , change costume to 'letter E' -- Show -- Stamp -- Hide -- change x by (how ever many increments you need between the current letter and the next letter)

Spacing Script:
If key Space is pressed -- change x by (how ever long you want the space to be)

Script that acts as Backspace:
If key 'left arrow ' pressed -- set costume to 'White' (or the color of word processor background) -- change x by (how ever many increments to move back and stamp over a letter) -- show -- stamp -- hide

Hope this helps you out!

Can you show me that in Scratch blocks? I fail to understand it.  sad
WindozeNT

EDIT: Where is the Stamp block...or how do you make a sprite "Stamp"?

Last edited by WindozeNT (2010-07-12 09:04:30)


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#5 2010-07-12 08:52:46

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How do you make a word processor?

WindozeNT wrote:

coka wrote:

I would make one sprite with 26 costumes (each letter of the alphabet) and you can add numbers too.

Scripting:

Typing Letters (and Numbers):
When you press a button, for example the letter 'E' , change costume to 'letter E' -- Show -- Stamp -- Hide -- change x by (how ever many increments you need between the current letter and the next letter)

Spacing Script:
If key Space is pressed -- change x by (how ever long you want the space to be)

Script that acts as Backspace:
If key 'left arrow ' pressed -- set costume to 'White' (or the color of word processor background) -- change x by (how ever many increments to move back and stamp over a letter) -- show -- stamp -- hide

Hope this helps you out!

Can you show me that in Scratch blocks? I fail to understand it.  sad
WindozeNT

What Coka showed you was much more a concept than actual scripting; essentially you need to switch to the costume of the key press and stamp.

Offline

 

#6 2010-07-12 09:19:55

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

coolstuff wrote:

What Coka showed you was much more a concept than actual scripting; essentially you need to switch to the costume of the key press and stamp.

So it's like this:
When [ a ] key pessed
{stamp}
switch to costume [ A ]
Change (X postion) by {number}
If <touching color [blue]?>
Go to x:{number} y: {number}

How do you stamp a sprite?
WindozeNT


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#7 2010-07-12 09:22:19

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How do you make a word processor?

WindozeNT wrote:

coolstuff wrote:

What Coka showed you was much more a concept than actual scripting; essentially you need to switch to the costume of the key press and stamp.

So it's like this:
When [ a ] key pessed
{stamp}
switch to costume [ A ]
Change (X postion) by {number}
If <touching color [blue]?>
Go to x:{number} y: {number}

How do you stamp a sprite?
WindozeNT

Just use the "Stamp" block in the "pen" category  smile

And it should switch to the costume *before* stamping.

Offline

 

#8 2010-07-12 10:41:40

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

I have a problem. Every time I press a key, it doesn't stamp a copy; it just moves! I used:
[blocks]<when[ a ]key pressed>
<stamp>
<switch to costume[ A ]>
<change x by( 15 )>

<when[ b ]key pressed>
<stamp>
<switch to costume[ B ]>
<change x by( 15 )>
[/blocks] etc., etc., ect...
I've even tried this:
[blocks]<when[ b ]key pressed>
<switch to costume[ B ]>
<stamp>
<change x by( 15 )>[/blocks]
And this:
[blocks]<when[ b ]key pressed>
<switch to costume[ B ]>
<change x by( 15 )>
<stamp>[/blocks]

What's going on? How do I fix this?
WindozeNT


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#9 2010-07-12 11:17:20

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: How do you make a word processor?

coolstuff wrote:

What Coka showed you was much more a concept than actual scripting; essentially you need to switch to the costume of the key press and stamp.

Exactly.
__________________________________________________

You are not the only one that can't just make a project by looking at worded directions with no pictures.  tongue  What I recommend is looking at a word processor that is on Scratch already. If you can download it, look at the scripts, script your own project, and make it unique in some way, so that it is not an exact copy of the example processor.

(link to Word Processors on Scratch)

Last edited by coka (2010-07-12 11:20:41)


http://i42.tinypic.com/2rot8c2.png

Offline

 

#10 2010-07-12 11:33:01

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

Well, I've already scripted mine, but I can't stamp the letters. The sprite just changes its X position by 15 and changes the costume. I dosen't seem to make use of the
stamp block. See above post.
WindozeNT

Last edited by WindozeNT (2010-07-12 11:35:40)


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#11 2010-07-12 11:58:44

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

Here is the Word Processor project in a ZIP archive. What could be causing the unstamp? When I started, it didn't do this.
NOTE: Keep the red "obsolete!" block in there. It's in the stage and sprites. I want to add it in the list of control blocks but Scratch won't let me. Very rare block!
WindozeNT

Last edited by WindozeNT (2010-07-12 12:13:35)


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#12 2010-07-12 12:45:44

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: How do you make a word processor?

Try putting the "stamp" below the "switch to costume [ v]" block  smile  Also, if the sprite is hidden, it won't stamp - if you want it to be invisible, but able to stamp, try setting the ghost effect to 100 (the block is in "looks") Hope this helps  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#13 2010-07-12 12:53:21

coka
Scratcher
Registered: 2007-11-03
Posts: 1000+

Re: How do you make a word processor?

Wolfie1996 wrote:

Try putting the "stamp" below the "switch to costume [ v]" block  smile   Also, if the sprite is hidden, it won't stamp - if you want it to be invisible, but able to stamp, try setting the ghost effect to 100 (the block is in "looks") Hope this helps   smile

I tried what Wolfie mentioned on the project already, but they did not work (sorry). I found the actual solution though! Read below:

At the moment with Scratch 1.4, you can only stamp onto the project's background, so you need to make sprite 3 (the notepad program) part of the project's background for the letters to appear in the program.  wink

Last edited by coka (2010-07-12 13:00:02)


http://i42.tinypic.com/2rot8c2.png

Offline

 

#14 2010-07-12 13:18:40

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: How do you make a word processor?

coka wrote:

Wolfie1996 wrote:

Try putting the "stamp" below the "switch to costume [ v]" block  smile   Also, if the sprite is hidden, it won't stamp - if you want it to be invisible, but able to stamp, try setting the ghost effect to 100 (the block is in "looks") Hope this helps   smile

I tried what Wolfie mentioned on the project already, but they did not work (sorry). I found the actual solution though! Read below:

At the moment with Scratch 1.4, you can only stamp onto the project's background, so you need to make sprite 3 (the notepad program) part of the project's background for the letters to appear in the program.  wink

Ah - I didn't download the project. I assumed that it was a case of the sprite stamping while hidden ^^


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#15 2010-07-12 13:22:52

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

Re: How do you make a word processor?

coka wrote:

coolstuff wrote:

What Coka showed you was much more a concept than actual scripting; essentially you need to switch to the costume of the key press and stamp.

Exactly.
__________________________________________________

You are not the only one that can't just make a project by looking at worded directions with no pictures.  tongue  What I recommend is looking at a word processor that is on Scratch already. If you can download it, look at the scripts, script your own project, and make it unique in some way, so that it is not an exact copy of the example processor.

(link to Word Processors on Scratch)

this topic is at the top of the list  tongue


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

Offline

 

#16 2010-07-12 14:45:32

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

coka wrote:

Wolfie1996 wrote:

Try putting the "stamp" below the "switch to costume [ v]" block  smile   Also, if the sprite is hidden, it won't stamp - if you want it to be invisible, but able to stamp, try setting the ghost effect to 100 (the block is in "looks") Hope this helps   smile

I tried what Wolfie mentioned on the project already, but they did not work (sorry). I found the actual solution though! Read below:

At the moment with Scratch 1.4, you can only stamp onto the project's background, so you need to make sprite 3 (the notepad program) part of the project's background for the letters to appear in the program.  wink

That will be quite tedious, considering it will cause some simulation annoyances, since every application has a window sprite with it and I really don't feel like messing with advanced varibles and changing random things to "integrate" the window in the background. Anyway, it fixed it! Now all I need to do is get the letter spacing right and implement the ability to go to the next line when it reaches the end, like word wrap!
WindozeNT

Last edited by WindozeNT (2010-07-12 14:47:06)


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#17 2010-07-12 17:21:30

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How do you make a word processor?

If you wanted to make it so that the background could move, it would be quite difficult, but possible. You'd need to add each key press to a list, and then redraw the data from the list everytime the background moves. It's tedious and slow, but it's the only way  smile

Offline

 

#18 2010-07-12 19:48:22

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How do you make a word processor?

Looks like you guys have this pretty much solved.  smile  As for your word wrap solution, just do this:

Code:

When [a] key pressed:
switch to costume [a]
change x by (15)
If x postion > (max x position}
    set x to (min x position)
    change y by (-15)
stamp

That should work!  big_smile


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#19 2010-07-12 21:29:43

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

Harakou wrote:

Looks like you guys have this pretty much solved.  smile  As for your word wrap solution, just do this:

Code:

When [a] key pressed:
switch to costume [a]
change x by (15)
If x postion > (max x position}
    set x to (min x position)
    change y by (-15)
stamp

That should work!  big_smile

Excellent! >:-)
WindozeNT


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#20 2010-07-12 22:10:58

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

where is the max x position blocks at?


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#21 2010-07-12 22:11:30

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How do you make a word processor?

WindozeNT wrote:

where is the max x position blocks at?

They're not blocks - just make a variable for it.

Offline

 

#22 2010-07-13 12:08:03

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

Ok


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#23 2010-07-16 18:55:25

WindozeNT
Scratcher
Registered: 2010-06-05
Posts: 1000+

Re: How do you make a word processor?

bump


http://i48.tinypic.com/rlyo80.png
Ever since Misc was killed, I've pretty much stopped going to Scratch Forums...

Offline

 

#24 2010-07-17 17:08:46

jman13
Scratcher
Registered: 2009-12-09
Posts: 65

Re: How do you make a word processor?

WindozeNT wrote:

coka wrote:

I would make one sprite with 26 costumes (each letter of the alphabet) and you can add numbers too.

Scripting:

Typing Letters (and Numbers):
When you press a button, for example the letter 'E' , change costume to 'letter E' -- Show -- Stamp -- Hide -- change x by (how ever many increments you need between the current letter and the next letter)

Spacing Script:
If key Space is pressed -- change x by (how ever long you want the space to be)

Script that acts as Backspace:
If key 'left arrow ' pressed -- set costume to 'White' (or the color of word processor background) -- change x by (how ever many increments to move back and stamp over a letter) -- show -- stamp -- hide

Hope this helps you out!

Can you show me that in Scratch blocks? I fail to understand it.  sad
WindozeNT

EDIT: Where is the Stamp block...or how do you make a sprite "Stamp"?

here, try this:
<when[d]key pressed>
<switch to costume[d]
<change x by( how ever many increments you need)
<stamp>
also, the stamp block is in the pen palete.

Last edited by jman13 (2010-07-17 17:09:30)

Offline

 

#25 2010-07-18 04:19:17

freejam
Scratcher
Registered: 2010-03-31
Posts: 3

Re: How do you make a word processor?

idea- i made a windows vista simulator a while back. the MS word is only one sprite so yuo could right click on it goe export and import it into yuor project

Offline

 

Board footer