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

#1 2008-09-04 21:47:35

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

useless hacks...

Make a variable, while naming it, add "%n" without quotes, anywhere. This lets you put a number in the middle of a variable block. You can also use "%s" for strings, "%g" for a drop down list of graphic effects, "%l" for a list of costumes, "%C" or "%H" for two lists of sensors, and finally "%C" for a color picker.

nb: These are, as the title stated, useless. The values you enter in your custom fields will not be saved with the project...

The only use I'd imagine these blocks having IF they could be saved, are as comments.
Of course, comments have been brought back in 1.3, right?

EDIT:

Anyhow, I found more.  big_smile
Case sensitive, remember!
%I is an instrument list!
%i is actually used only for choosing a certain item from a specific list.
%y is a list item deleter!
%e is actually useful! It lets you name new broadcasts! Yay!
%L is a list of lists!
%l is a list of costumes!
%k is a list of keys!
%f is a list of math functions!
%D is a list of drum/tempo choices!
%s is a string field!
%S is a list of available sounds, and lets you record more!
%a should be a list, but isn't, and has a default value of "volume"!
%m is a list of things to touch! These include the mouse pointer and edge! Wow!
%n is a number field!
%N is midi note selector!
%b is a boolean container block nub thing!
%v is a list of variables!
%c is a small color picker, uses the eyedropper to choose color.
%C is a large color picker! It has it's own little color pickin' morph!
%x is a scene selector!!! Ooooh!! It has it's own dialogue for recording scenes!

The other %_ insert horrible fields. Don't do it.

That's all for now, folks!  yikes  yikes  yikes

BTW I didn't have to break out for anything but the initial discovery.
I went from right to left, top to bottom, upper to lower case, on the keyboard.
Somewhat useless, I should prolly be doing projects on scratch instead.
Or perhaps I should be sleeping? Nah...
Anyway, enjoy. Maybe.  sad

Last edited by MasterOfMac (2008-09-05 05:49:28)


*sarcasm*

Offline

 

#2 2008-09-04 22:08:05

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: useless hacks...

Oh wow, how did you find this out?


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2008-09-05 00:14:12

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: useless hacks...

ok now that is really interesting. i assume you figured this out while playing around with squeak...

Offline

 

#4 2008-09-05 05:03:32

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: useless hacks...

Actually, I'm learning C, and you have to use % to print a variable as a part of a line. So that's what made me realize that I might be able to fool scratch with that, since block fields are just implemented with %n, %l, etc. themselves. And then I tried it for fun.
It worked. ^.^


*sarcasm*

Offline

 

#5 2008-09-05 05:12:06

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: useless hacks...

MasterOfMac wrote:

Actually, I'm learning C, and you have to use % to print a variable as a part of a line. So that's what made me realize that I might be able to fool scratch with that, since block fields are just implemented with %n, %l, etc. themselves. And then I tried it for fun.
It worked. ^.^

I know some turbo c which is pretty similar  smile

Offline

 

#6 2008-09-06 02:44:37

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: useless hacks...

When you look into the language files (/locale/*.po) you'll see the same % codes are used...


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#7 2008-09-06 03:14:40

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Offline

 

#8 2008-09-06 05:46:56

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: useless hacks...

JSO wrote:

When you look into the language files (/locale/*.po) you'll see the same % codes are used...

I found this out today!
Ha... I was creating a southern accented language, and realized that the block codes are all there.


*sarcasm*

Offline

 

#9 2008-09-06 08:55:41

slaners5
Scratcher
Registered: 2008-06-24
Posts: 14

Re: useless hacks...

Wow

Offline

 

#10 2008-09-07 18:20:03

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: useless hacks...

slaners5 wrote:

Wow

I'm glad you're in awe.
Bow down before the one you serve.


*sarcasm*

Offline

 

#11 2008-09-07 18:35:03

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

Re: useless hacks...

I'm really curious about this %x thing. How do you use it? Is it some feature they took out?  A scene selector?

Offline

 

#12 2008-09-07 18:36:52

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

Re: useless hacks...

I think you forgot %g. It's an effects selection.

Ooh! And if you use %q or one of those useless things and try dropping a block inside it you get an error message!

Last edited by coolstuff (2008-09-07 18:38:13)

Offline

 

#13 2008-09-08 16:00:10

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: useless hacks...

%x is not an implemented feature in 1.3, and it does not work even if you manage to get the diologue up. Useless.  big_smile
The %q is simply a null field. This works with any character put after a '%' that hasn't been defined.
I'm working on fixing it though.
I didn't create this topic as a method of breaking out, it's just an interesting discovery.
smile


*sarcasm*

Offline

 

Board footer