Discuss Scratch

ILikeScratch0-0-0-1
Scratcher
27 posts

Creating extensions for Scratch 3.0

(function(ext) {
    // Cleanup function when the extension is unloaded
    ext._shutdown = function() {};
    // Status reporting code
    // Use this to report missing hardware, plugin or unsupported browser
    ext._getStatus = function() {
        return {status: 2, msg: 'Ready'};
    };
    
    // functions
    ext.runJs = function(stuff) {
        document.body.innerHTML += '<script>' + stuff + '</script>';
    }
    
    ext.a = function(stuff) {
        alert(stuff);
    }
   ext.pr = function(stuff, de) {
        window.promptMessage = window.prompt(stuff, de);
    }
    ext.an = function() {
        return window.promptMessage;
    }
    // Block and block menu descriptions
    var descriptor = {
        blocks: [
            ['', 'run JavaScript %s', 'runJs', 'console.log("hello world!");'],
            ['', 'alert %s', 'a', 'message1'],
            ['', 'prompt %s with default message %s', 'pr', 'hello world!'],
            ['r', 'prompt answer', 'an']
        ]
    };
    // Register the extension
    ScratchExtensions.register('JavaScript', descriptor, ext);
})({});
Outputs:
run JavaScript [console.log("hello world!");] ::extension

alert [message1] ::extension

prompt [hello world!] with default message [] ::extension

prompt answer :: extension reporter
pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

ILikeScratch0-0-0-1 wrote:

(function(ext) {
    // Cleanup function when the extension is unloaded
    ext._shutdown = function() {};
    // Status reporting code
    // Use this to report missing hardware, plugin or unsupported browser
    ext._getStatus = function() {
        return {status: 2, msg: 'Ready'};
    };
    
    // functions
    ext.runJs = function(stuff) {
        document.body.innerHTML += '<script>' + stuff + '</script>';
    }
    
    ext.a = function(stuff) {
        alert(stuff);
    }
   ext.pr = function(stuff, de) {
        window.promptMessage = window.prompt(stuff, de);
    }
    ext.an = function() {
        return window.promptMessage;
    }
    // Block and block menu descriptions
    var descriptor = {
        blocks: [
            ['', 'run JavaScript %s', 'runJs', 'console.log("hello world!");'],
            ['', 'alert %s', 'a', 'message1'],
            ['', 'prompt %s with default message %s', 'pr', 'hello world!'],
            ['r', 'prompt answer', 'an']
        ]
    };
    // Register the extension
    ScratchExtensions.register('JavaScript', descriptor, ext);
})({});
Outputs:
run JavaScript [console.log("hello world!");] ::extension

alert [message1] ::extension

prompt [hello world!] with default message [] ::extension

prompt answer :: extension reporter[/quote]
cool javascript extesion
jaylengood
Scratcher
14 posts

Creating extensions for Scratch 3.0

hello
JackVideos
Scratcher
42 posts

Creating extensions for Scratch 3.0

pedrodrocafranco wrote:

JackVideos wrote:

I think I need an MLG Voice for Scratch!

when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)
thats is a mad extesion -1 vote

what!?!?
JackVideos
Scratcher
42 posts

Creating extensions for Scratch 3.0

I got crazy ideas again

when green flag clicked
auto lip-sync with audio [test.wav v] and with instance name [alligator]-mouth
Cutiepieofme
Scratcher
60 posts

Creating extensions for Scratch 3.0

JackVideos wrote:

I got crazy ideas again

when green flag clicked
auto lip-sync with audio [test.wav v] and with instance name [alligator]-mouth
This one's nice! +100 votes!!

Last edited by Cutiepieofme (Oct. 24, 2020 06:19:15)

Cutiepieofme
Scratcher
60 posts

Creating extensions for Scratch 3.0

Jaylengood wrote:

hello
Hello!

Cutie guide wrote:

This is where we find exetension ideas for scratch 3.0!
pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

gigaboard extesion
when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end

Last edited by pedrodrocafranco (Oct. 24, 2020 16:52:11)

Cutiepieofme
Scratcher
60 posts

Creating extensions for Scratch 3.0

pedrodrocafranco wrote:

gigaboard extesion
when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
Nice! But what's comns?
pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

Cutiepieofme wrote:

pedrodrocafranco wrote:

gigaboard extesion
when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
Nice! But what's comns?
if touched a banna,apple,pineapple or a toy!
Cutiepieofme
Scratcher
60 posts

Creating extensions for Scratch 3.0

pedrodrocafranco wrote:

Cutiepieofme wrote:

pedrodrocafranco wrote:

gigaboard extesion
when green flag clicked
if <[pins v] sensor value is (...)::pen> then
wait until <when [button pressed v]?::pen>
set pin comns to [pin contacted object v]::pen
end
Nice! But what's comns?
if touched a banna,apple,pineapple or a toy!
Oh, okay!
pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

my final idea extesion called : intel control and soundwaves
has 1 repoter 4 booleans 2 stack blocks
when green flag clicked
if a value is (10)?::pen
play a soundtrack of [relaxing v]::pen
if <[relaxing v] sound track playing?::pen> then
say ([soundtracks v] value::pen) for (2) secs
wait until <every value is (pick random (0) to (10))::pen>
wait until <pin number::pen>
wait until <a pin is touching on a[banana v]::pen>
stop [all v]
end
TheNothingBird
Scratcher
100+ posts

Creating extensions for Scratch 3.0

JackVideos wrote:

I think I need an MLG Voice for Scratch!

when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)

support.
Cutiepieofme
Scratcher
60 posts

Creating extensions for Scratch 3.0

TheNothingBird wrote:

JackVideos wrote:

I think I need an MLG Voice for Scratch!

when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)

support.
Supporttt +1 vote

Last edited by Cutiepieofme (Oct. 28, 2020 13:38:13)

pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

TheNothingBird wrote:

JackVideos wrote:

I think I need an MLG Voice for Scratch!

when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)

support.

Cutiepieofme wrote:

TheNothingBird wrote:

JackVideos wrote:

I think I need an MLG Voice for Scratch!

when green flag clicked
import voice [(UK) Daniel v] and then say [hello my favorite people!!!] (1) times::#ABCDFE
say (join (text to speech::#ABCDFE) [ i hope you like me!!!
go to x: (0) y: (0)
change x by: (tts soundwave::#ABCDFE)

support.
Supporttt +1 vote
this thing is bad for everyone thats bad -1000000000000000000000000000000000000000000000000000 vote
Sasuke_MESS10
Scratcher
62 posts

Creating extensions for Scratch 3.0

thx
pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

this is a a sprite is import a obsulete blocks note is not a extesion
when green flag clicked
if <(abs (10)) > [1]> then
say [in not]
say nothing
stamp
stamp transpararent (20)
stop all (::obsulete)::cap
end
pedrodrocafranco
Scratcher
500+ posts

Creating extensions for Scratch 3.0

this is another ideas is called : scratchVR

is a 3D extesions!
blocks
when green flag clicked
start 3D reactions::pen
3D ballon text [helloworld3D!]::pen
if <movie time::pen> then
start movie for (120)secs::pen
end
stop movie::pen
stop 3D reactions:: pen cap

Last edited by pedrodrocafranco (Nov. 3, 2020 19:20:14)

vvimal9
Scratcher
34 posts

Creating extensions for Scratch 3.0

open https://machinelearningforkids.co.uk/#!/welcome
and even there is voice tracker

DabDatBass
Scratcher
1000+ posts

Creating extensions for Scratch 3.0

How to make extensions using repl.it?

Powered by DjangoBB