Discuss Scratch

iwotastic
Scratcher
100+ posts

How to Make an Experimental Extension for Scratch 2.0

Requirements:
  • Text Editor (Text Edit, Notepad, etc.)
  • Web Browser with a console (Safari, Chrome, etc.)
Making The Extension:
You can either follow the directions at this awesome site or follow the directions below for how to make the Javascript extension.
  1. Open up your text editor and paste this code in the editor:
    (function(ext) {
        // Code to be run when the user closes the window, reloads the page, etc.    
        ext._shutdown = function() {};
        
        // Shows the status of the extension 0 = red, 1 = yellow, and 2 = green
        ext._getStatus = function() {
            return {status: 2, msg: 'Ready'};
        };
        // Descriptions of the blocks and menus the extension adds
        var descriptor = {
            blocks: [
            ]
        };
        // Register the extension
        ScratchExtensions.register('Hello World', descriptor, ext);
    })({});
    
  2. Lets add the simplest block (a block that does nothing) to make this block add this code
     [' ', 'hello world'] 
    
    into the part of the code in the editor that says var descriptor = [ blocks: ]; in between the brackets to the right of blocks: if done correctly it will add this block:
    hello world :: extension
  3. Lets install this now! open up your Web Browser and create a new scratch project then open up the Javascript console and paste the code in your text editor into it then press enter (if it doesn't auto load). If the More Blocks pane contains Hello World then hooray you've made your first extension!
Moving On
Go to this site for more on extensions.

Last edited by iwotastic (Dec. 5, 2014 20:53:01)

ChocolatePi
Scratcher
1000+ posts

How to Make an Experimental Extension for Scratch 2.0

Nice tutorial!

Although it is giving me an error.

Last edited by ChocolatePi (Dec. 2, 2014 17:35:37)

iwotastic
Scratcher
100+ posts

How to Make an Experimental Extension for Scratch 2.0

Sorry ChocolatePi keep trying to make your extension. The extension that I made threw an error just because I accidentally typed an r in an incorrect place . If you keep on having errors it could be that my tutorial was wrong if so try this site. If you figure the error out please post your extension I'd love to try it out.

Good Luck Iwotastic!

ChocolatePi
Scratcher
1000+ posts

How to Make an Experimental Extension for Scratch 2.0

iwotastic wrote:

Sorry ChocolatePi keep trying to make your extension. The extension that I made threw an error just because I accidentally typed an r in an incorrect place . If you keep on having errors it could be that my tutorial was wrong if so try this site. If you figure the error out please post your extension I'd love to try it out.

Good Luck Iwotastic!

I got it! I looked on that site and I am in the process of making a trigonometry extension right now
iwotastic
Scratcher
100+ posts

How to Make an Experimental Extension for Scratch 2.0

ChocolatePi wrote:

iwotastic wrote:

Sorry ChocolatePi keep trying to make your extension. The extension that I made threw an error just because I accidentally typed an r in an incorrect place . If you keep on having errors it could be that my tutorial was wrong if so try this site. If you figure the error out please post your extension I'd love to try it out.

Good Luck Iwotastic!

I got it! I looked on that site and I am in the process of making a trigonometry extension right now
Awesome ChocolatePi can't wait to see it.
MrSherlockHolmes
Scratcher
500+ posts

How to Make an Experimental Extension for Scratch 2.0

Really nice Idea!

Centred signature.
MrSherlockHolmes
Scratcher
500+ posts

How to Make an Experimental Extension for Scratch 2.0

ChocolatePi wrote:

iwotastic wrote:

Sorry ChocolatePi keep trying to make your extension. The extension that I made threw an error just because I accidentally typed an r in an incorrect place . If you keep on having errors it could be that my tutorial was wrong if so try this site. If you figure the error out please post your extension I'd love to try it out.

Good Luck Iwotastic!

I got it! I looked on that site and I am in the process of making a trigonometry extension right now
Really? Cool! I bookmarked and loaded some extensions and there so cool!

Centred signature.
MrSherlockHolmes
Scratcher
500+ posts

How to Make an Experimental Extension for Scratch 2.0

ChocolatePi wrote:

iwotastic wrote:

Sorry ChocolatePi keep trying to make your extension. The extension that I made threw an error just because I accidentally typed an r in an incorrect place . If you keep on having errors it could be that my tutorial was wrong if so try this site. If you figure the error out please post your extension I'd love to try it out.

Good Luck Iwotastic!

I got it! I looked on that site and I am in the process of making a trigonometry extension right now
I got it too! So happy

Centred signature.
Conorb06
Scratcher
44 posts

How to Make an Experimental Extension for Scratch 2.0

how do you open the java script console?

iwotastic
Scratcher
100+ posts

How to Make an Experimental Extension for Scratch 2.0

Conorb06 wrote:

how do you open the java script console?
What Browser are you using?
dschulenburg
Scratcher
20 posts

How to Make an Experimental Extension for Scratch 2.0

i accedentally clicked it on the more blocks extension now how do i exit i forgot to save and i dont want to refresh the page please help me

move (Forward) steps
broadcast [Live Life v] and wait
liam48D
Scratcher
1000+ posts

How to Make an Experimental Extension for Scratch 2.0

Nvm.

Last edited by liam48D (July 19, 2015 11:07:30)


202e-202e-202e-202e-202e UNI-CODE~~~~~
digitcrusher
Scratcher
40 posts

How to Make an Experimental Extension for Scratch 2.0

Gotta learn some JavaScript!

Achievement get! noclip!
My blog: http://pixelblogging.blogspot.com/
My Youtube channel: https://www.youtube.com/user/digitcrusher
coocoo333
Scratcher
93 posts

How to Make an Experimental Extension for Scratch 2.0

what javascript panel

Hello

when green flag clicked
forever
if <ask [hello] and wait> then
ask [] and wait

(x position)
say [dw]

else
(x position)
say [dw]
lugga
Scratcher
500+ posts

How to Make an Experimental Extension for Scratch 2.0

coocoo333 wrote:

what javascript panel
Please don't necropost.
The last post was on April 1st and that was a necropost on a year-old topic.
In the future, please try and check the date.
The javascript console is normally in a area accessed by pressing F12
April 1st was 8 months ago. The general rule (on most other forums) is after a month of innactivity, the topic is dead.
Just wanted to warn you as it can annoy some people.
coocoo333
Scratcher
93 posts

How to Make an Experimental Extension for Scratch 2.0

lugga wrote:

coocoo333 wrote:

what javascript panel
Please don't necropost.
The last post was on April 1st and that was a necropost on a year-old topic.
In the future, please try and check the date.
The javascript console is normally in a area accessed by pressing F12
April 1st was 8 months ago. The general rule (on most other forums) is after a month of innactivity, the topic is dead.
Just wanted to warn you as it can annoy some people.


oh I had no Idea

wouldn't it set every thing back to normal

you would need to use a chrome exstension called tampermonkey for it to work

Hello

when green flag clicked
forever
if <ask [hello] and wait> then
ask [] and wait

(x position)
say [dw]

else
(x position)
say [dw]
AmazingMech2418
Scratcher
1000+ posts

How to Make an Experimental Extension for Scratch 2.0

ChocolatePi wrote:

iwotastic wrote:

Sorry ChocolatePi keep trying to make your extension. The extension that I made threw an error just because I accidentally typed an r in an incorrect place . If you keep on having errors it could be that my tutorial was wrong if so try this site. If you figure the error out please post your extension I'd love to try it out.

Good Luck Iwotastic!

I got it! I looked on that site and I am in the process of making a trigonometry extension right now
Great! I actually am making a scratch extension that has radian trig. I'm guessing that that is what your extension does.

I'm a programmer, ethical hacker, and space nerd!

Last edited by Neil Armstrong (July 20, 1969 20:17:00)












sam

Powered by DjangoBB