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

#1 2010-06-23 08:23:53

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

ASCII for [] block

Anyone have the code?


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#2 2010-06-23 08:35:54

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: ASCII for [] block

('ascii for %s' #r #asciiFor: 'A')

That's the block spec, just put it in block specs of ScriptableScratchMorph, you don't need to code anything other.


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2010-06-23 08:38:50

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: ASCII for [] block

Thanks!


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#4 2010-07-09 23:03:33

celloguy123
Scratcher
Registered: 2009-01-15
Posts: 100+

Re: ASCII for [] block

It doesn't work. It says the ascii for a is 65.


http://internetometer.com/image/33068.png

Offline

 

#5 2010-07-10 09:50:07

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: ASCII for [] block

BYOB has it...


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#6 2010-07-10 14:14:44

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: ASCII for [] block

asciiFor: is specialized to work for keypresses, so is case-insensitive. I think it's

t1 asString first asciiValue.


nXIII

Offline

 

#7 2010-07-10 20:39:23

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: ASCII for [] block

Dangit, you beat me two that whole case insensitive thing.

anywho -

http://i32.tinypic.com/fk86e9.jpg

is not case sensitive, A is 65, and nXIII has found the most obvious reason why.


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#8 2010-07-10 22:55:05

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: ASCII for [] block

Bumping the actual code:

Code:

asciiOfCharacter: t1
^ t1 asString first asciiValue

nXIII

Offline

 

#9 2010-07-23 16:41:42

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: ASCII for [] block

Added


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#10 2010-11-21 18:37:03

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ASCII for [] block

waveOSBeta wrote:

Anyone have the code?

http://scratch.mit.edu/projects/Pecola1/1429431 i made a tutorial
http://scratch.mit.edu/static/projects/Pecola1/1431279_sm.png
Go there^!

Last edited by Pecola1 (2010-11-21 21:09:56)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

Board footer