Discuss Scratch

SimpleScratch
Scratcher
500+ posts

Accessing script information using HTTP offline extensions

Is there a method of finding out the current blocks on stage from within an extension?

Simon
QuillzToxic
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

SimpleScratch wrote:

Is there a method of finding out the current blocks on stage from within an extension?

Simon
The current blocks?


when green flag clicked
add [when green flag clicked] to [Stage v]
say [Hai] for (2) secs
add [ say [Hai] for (2) secs ] to [Stage v]

But their should be xD

Last edited by QuillzToxic (April 12, 2015 15:18:32)

SimpleScratch
Scratcher
500+ posts

Accessing script information using HTTP offline extensions

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
djdolphin
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

SimpleScratch wrote:

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
I don't think that's currently possible.

!
MegaApuTurkUltra
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

SimpleScratch wrote:

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
Grab the JSON and see all the green hat scripts?

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
bobbybee
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

See the Scratch API page on the Scratch Wiki.

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
MegaApuTurkUltra
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

MegaApuTurkUltra wrote:

SimpleScratch wrote:

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
Grab the JSON and see all the green hat scripts?
Actually, whoops! Sorry

I didn't read “offline extensions”

I guess this doesn't help, then…

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
bobbybee
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

MegaApuTurkUltra wrote:

MegaApuTurkUltra wrote:

SimpleScratch wrote:

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
Grab the JSON and see all the green hat scripts?
Actually, whoops! Sorry

I didn't read “offline extensions”

I guess this doesn't help, then…

It still does – assuming that the offline extension is written in a modern language (say, Python or node.js), then SimpleScratch will still have access to the web with generic web requests (it is, after all, a simple REST API).

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
MegaApuTurkUltra
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

bobbybee wrote:

MegaApuTurkUltra wrote:

MegaApuTurkUltra wrote:

SimpleScratch wrote:

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
Grab the JSON and see all the green hat scripts?
Actually, whoops! Sorry

I didn't read “offline extensions”

I guess this doesn't help, then…

It still does – assuming that the offline extension is written in a modern language (say, Python or node.js), then SimpleScratch will still have access to the web with generic web requests (it is, after all, a simple REST API).
I think you're forgetting that offline projects are offline

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
djdolphin
Scratcher
1000+ posts

Accessing script information using HTTP offline extensions

MegaApuTurkUltra wrote:

bobbybee wrote:

MegaApuTurkUltra wrote:

MegaApuTurkUltra wrote:

SimpleScratch wrote:

No I mean finding out the name/sequence of the script blocks below the Green Hat - eg get an extension to read the current script
Grab the JSON and see all the green hat scripts?
Actually, whoops! Sorry

I didn't read “offline extensions”

I guess this doesn't help, then…

It still does – assuming that the offline extension is written in a modern language (say, Python or node.js), then SimpleScratch will still have access to the web with generic web requests (it is, after all, a simple REST API).
I think you're forgetting that offline projects are offline
You can't get a project that isn't on Scratch's servers using the API.

!

Powered by DjangoBB