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

#1 2011-09-24 09:18:11

Scratchthatguys
Scratcher
Registered: 2010-07-16
Posts: 1000+

Creating a Scratch block that executes code?

This would be really easy in BYOB, but what about in Squeak? We'd have to define code and what it does, and it'd take ages.

BYOB or squeak?

Offline

 

#2 2011-09-24 09:23:38

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Creating a Scratch block that executes code?

Byob ftw!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#3 2011-09-24 12:09:50

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: Creating a Scratch block that executes code?

Actually, this would be easier in Squeak than in BYOB. I've tried both. I've successfully made one in Squeak which executes Squeak code, but I've tried to do this in BYOB several times and failed.


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#4 2011-09-26 22:32:32

Function
New Scratcher
Registered: 2011-09-26
Posts: 2

Re: Creating a Scratch block that executes code?

what would you use it for? I havnt found much need for more complex blocks then that exist.

Offline

 

#5 2011-09-27 20:59:29

Scratchthatguys
Scratcher
Registered: 2010-07-16
Posts: 1000+

Re: Creating a Scratch block that executes code?

Like, you ask the user to type in a code and it checks to see if it's a command, and if not it returns the error value. I did it in BYOB already.  big_smile  Still bugfixing though.

Offline

 

#6 2011-09-28 10:04:12

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: Creating a Scratch block that executes code?

Yeah... I have done it in squeak.


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#7 2011-10-02 15:49:08

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Creating a Scratch block that executes code?

There's one (actually 4) in Slash, you can use it if you want.

Offline

 

#8 2011-10-02 16:20:56

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Creating a Scratch block that executes code?

Compiler evaluate: t1 for: t2 logged: false

Offline

 

#9 2011-10-02 17:18:25

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

Re: Creating a Scratch block that executes code?

scimonster wrote:

Compiler evaluate: t1 for: t2 logged: false

Oh THATS what they were asking for XD I had no clue.


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

 

#10 2011-10-03 16:45:41

Scratchthatguys
Scratcher
Registered: 2010-07-16
Posts: 1000+

Re: Creating a Scratch block that executes code?

scimonster wrote:

Compiler evaluate: t1 for: t2 logged: false

No. I meant user-created commands.

Offline

 

#11 2011-10-04 09:39:45

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

Re: Creating a Scratch block that executes code?

Scratchthatguys wrote:

scimonster wrote:

Compiler evaluate: t1 for: t2 logged: false

No. I meant user-created commands.

What? User created commands? Idk what that is...


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

 

#12 2011-10-05 18:16:16

Scratchthatguys
Scratcher
Registered: 2010-07-16
Posts: 1000+

Re: Creating a Scratch block that executes code?

User DEFINED commands.

@Pecola1's sig: NO I DID NOT VOTE FOR YOU! You didn't even run in the mod elections!

Offline

 

#13 2011-10-05 18:29:20

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Creating a Scratch block that executes code?

Billybob-Mario wrote:

There's one (actually 4) in Slash, you can use it if you want.

I swear to god, if you don't stop randomly advertising Slash, I'ma start reporting it every time you do.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#14 2011-10-05 19:04:56

Scratchthatguys
Scratcher
Registered: 2010-07-16
Posts: 1000+

Re: Creating a Scratch block that executes code?

Billybob-Mario wrote:

There's one (actually 4) in Slash, you can use it if you want.

Uhh, I have Slash and there isn't... and you stole the BYOB logo!

Offline

 

#15 2011-10-05 20:16:40

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

Re: Creating a Scratch block that executes code?

Scratchthatguys wrote:

User DEFINED commands.

@Pecola1's sig: NO I DID NOT VOTE FOR YOU! You didn't even run in the mod elections!

I never held up a sign, the sign 'senses' who you voted for for the us president. XD I do know I didnt run, im only 13 3/4 I cant run.


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

 

#16 2011-10-05 20:17:51

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Creating a Scratch block that executes code?

Pecola1 wrote:

Scratchthatguys wrote:

User DEFINED commands.

@Pecola1's sig: NO I DID NOT VOTE FOR YOU! You didn't even run in the mod elections!

I never held up a sign, the sign 'senses' who you voted for for the us president. XD I do know I didnt run, im only 13 3/4 I cant run.

you can run at 13 now
didnt you know
they changed it
and i knew that

how did u not


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#17 2011-10-05 20:18:25

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

Re: Creating a Scratch block that executes code?

bbbeb wrote:

Billybob-Mario wrote:

There's one (actually 4) in Slash, you can use it if you want.

I swear to god, if you don't stop randomly advertising Slash, I'ma start reporting it every time you do.

HE ISN'T RANDOMLY ADVERTISING IT! HE IS SIMPLY SAYING THAT ANYONE CAN COPY THE BLOCK FROM IT. I WOULDN'T SWEAR TO GOD CUZ HE WILL STRIKE YOU DOWN FOR IT. No jk intended.


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

 

#18 2011-10-05 20:19:33

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

Re: Creating a Scratch block that executes code?

ssss wrote:

Pecola1 wrote:

Scratchthatguys wrote:

User DEFINED commands.

@Pecola1's sig: NO I DID NOT VOTE FOR YOU! You didn't even run in the mod elections!

I never held up a sign, the sign 'senses' who you voted for for the us president. XD I do know I didnt run, im only 13 3/4 I cant run.

you can run at 13 now
didnt you know
they changed it
and i knew that

how did u not

I was gone i guess... I can run now! Cool. When is the next election. XD yeah ik, A LONG TIME.


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

 

#19 2011-10-05 20:20:51

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

Re: Creating a Scratch block that executes code?

Pecola1 wrote:

ssss wrote:

Pecola1 wrote:


I never held up a sign, the sign 'senses' who you voted for for the us president. XD I do know I didnt run, im only 13 3/4 I cant run.

you can run at 13 now
didnt you know
they changed it
and i knew that

how did u not

I was gone i guess... I can run now! Cool. When is the next election. XD yeah ik, A LONG TIME.

Scratchthatguys wrote:

Billybob-Mario wrote:

There's one (actually 4) in Slash, you can use it if you want.

Uhh, I have Slash and there isn't... and you stole the BYOB logo!

It is the [Run code { }] Block but it isn't what you are looking for.


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

 

#20 2011-10-05 20:24:51

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Creating a Scratch block that executes code?

Pecola1 wrote:

ssss wrote:

Pecola1 wrote:


I never held up a sign, the sign 'senses' who you voted for for the us president. XD I do know I didnt run, im only 13 3/4 I cant run.

you can run at 13 now
didnt you know
they changed it
and i knew that

how did u not

I was gone i guess... I can run now! Cool. When is the next election. XD yeah ik, A LONG TIME.

it was the same at the last election
you were gone
way gone
oh yeah


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

Board footer