This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Advanced Topics
  •  » Fully functional plugin to create scratchblocks code within Scratch!

#51 2012-07-30 17:49:34

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

LS97 wrote:

Thanks for your opinions and tests, guys!

It seems to me that the last two scripts were converted perfectly by the plugin. The blank ask block in Lucario's script left me perplexed, but I figure it's also done in the original script (which makes sense, since it looks nicer).

This spacing issue has already been reported by scimonster. What browsers are you guys using? In any case remember blank lines don't actually affect the renderer, so blocks get parsed anyway.

Having such feature in Scratch 2.0 (as well as vice versa -- copying the text of a scratchblocks into Scratch, which I would happily create a plugin for too if it weren't for its current futility for reasons stated at asterisk*) would really be nice. You guys, being mods, don't happen to have any news/influence on this matter?

*Asterisk. I would have created a plugin to parse scratchblocks code and spawn a script, but I found the costs outweighed the benefits. This is because the user that wants the scratchblocks code must either view the wiki source or quote the forum user to get raw code, as selecting the text of the blocks and copying that instead does not work.

However, I thought of a mechanism that would allow such copying supported by all browsers. Shouldn't it be possible to hide brackets and other symbols used in scratchblocks code as invisible text in the rendered version? That way it wouldn't affect viewing, but would be copied when selected.

Anyway, that was a way too long footnote.

It would still be useful, even if I had to quote someone/view the wiki source. It could also be used to copy scripts from one project to another, or write scripts in a text-based way.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#52 2012-07-31 09:20:40

Dominic1
Scratcher
Registered: 2009-07-30
Posts: 89

Re: Fully functional plugin to create scratchblocks code within Scratch!

I used my patch importing system (based off of all sorts of other versions of it) and it worked well!


when gf clicked

go back (10) layers

go to x: (0) y: (0)

forever  

hide

wait (pick random (0) to ((22) - ((Difficulty) * (2)))) secs

show

go to x: (240) y: (pick random (-140) to (172))

point in direction (-90 v)

turn ccw ((pick random (-2) to (2)) * (15)) degrees

repeat until <touching [Paddle v]?>  

move (Difficulty) steps

replace item (1 v) of [Xpos v] with ((10) * (round ((x position) / (10))))

if <touching color [#FFFFFF]?> 

point in direction (((direction) + (180)) * (-1))

end

end

go to x: (240) y: (0)

replace item (1 v) of [Xpos v] with [1]

change [Score v] by (1)

change [red dots v] by (1)

end


http://i49.tinypic.com/oiwvh5.jpg

Offline

 

#53 2012-08-05 02:44:25

zubblewu
Scratcher
Registered: 2011-02-17
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

Bumping this awesome topic  smile


........................................................................................................................................................................................................................................

Offline

 

#54 2012-08-05 04:02:13

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

That's nice, I don't even need to bump it myself  big_smile

Offline

 

#55 2012-08-13 06:44:16

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Fully functional plugin to create scratchblocks code within Scratch!

Would it work with NXiii's patcher?
I'll try converting it to .patch. It should work.


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#56 2012-08-13 07:59:24

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

whizzer wrote:

Would it work with NXiii's patcher?
I'll try converting it to .patch. It should work.

It should work, because I once looked at the source of patch files and they are at least very similar to CS files. So try it, and if it doesn't, the second post on this thread has some information on how to install it manually  smile

Offline

 

#57 2012-08-17 14:10:32

laurentk2
Scratcher
Registered: 2011-11-11
Posts: 43

Re: Fully functional plugin to create scratchblocks code within Scratch!

this is so epic  big_smile

when gf clicked
say [thank you LS94 for this awesome script program :D]

Offline

 

#58 2012-08-17 14:14:07

laurentk2
Scratcher
Registered: 2011-11-11
Posts: 43

Re: Fully functional plugin to create scratchblocks code within Scratch!

set (awesomeness!!!!!!!!!!!!!!!!!!!!) to 9999999999999999999999999999999999999999999999999999999999999

Offline

 

#59 2012-08-18 18:34:22

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

lol, thank you very much  smile

Offline

 

#60 2012-08-19 04:32:28

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Fully functional plugin to create scratchblocks code within Scratch!

LS97 wrote:

whizzer wrote:

Would it work with NXiii's patcher?
I'll try converting it to .patch. It should work.

It should work, because I once looked at the source of patch files and they are at least very similar to CS files. So try it, and if it doesn't, the second post on this thread has some information on how to install it manually  smile

.patch files ARE .cs files. .patch is an extension made up  by NXiii.
Anyway, I converted it and it worked.  wink

Here is the .patch version in case anyone wants it.


when gf clicked

forever  

change [awesomeness v] by (999999999999999999999999999999999999999999999999999999999999999999999)

say [This plugin rules!!!!!] for (2) secs

think [I think...] for (2) secs

end

Last edited by whizzer (2012-08-19 04:34:52)


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#61 2012-08-19 14:40:27

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

I'm new to the Shift-Click-R thing, and when I right click on the file (the last step), weird buttons show up, none saying filein, can you tell me how to fix it?

Offline

 

#62 2012-08-19 19:19:56

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

Are you on a Mac? Maybe try any of Alt+Click, Ctrl+Click, or Shift+Click instead of right clicking. I can never remember which works...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#63 2012-08-19 21:02:32

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

I just downloaded and installed it.  It seems to work perfectly.  Thanks so much for coding it!   smile

Last edited by Greenatic (2012-08-19 21:02:41)

Offline

 

#64 2012-08-20 05:26:34

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

whizzer wrote:

.patch files ARE .cs files. .patch is an extension made up  by NXiii.
Anyway, I converted it and it worked.

Yes, I remember nXIII posting about them. The good old times when there were more awesome coders  tongue

Greenatic wrote:

I just downloaded and installed it.  It seems to work perfectly.  Thanks so much for coding it!

You're welcome and glad you like it  smile

Offline

 

#65 2012-08-20 05:30:14

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

LS97, how's the Script-to-Squeak-converter working out?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#66 2012-08-20 16:21:30

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

I was playing with this earlier to see how you did obsolete blocks, to make sure I agreed with you: but you seem to have just put the block's text.

The only nice way I can think of doing them is as booleans — "<obsolete!>" — so that they get colored red:

if <(join <obsolete!> []) = [a ScratchSpriteMorph()]>
And I'd also suggest adding indentation, so blocks inside the mouth of a C-block are indented one tab, and so on.  smile

Last edited by blob8108 (2012-08-20 16:26:15)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#67 2012-08-20 17:08:10

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

Hardmath123 wrote:

LS97, how's the Script-to-Squeak-converter working out?

*blushes from shame*
Ehm, I kinda forgot about that right now, because I'm working on the API2 project with sparks and fg123, but I will continue it as soon as I can!
Sorry  sad

Offline

 

#68 2012-08-20 17:11:39

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

blob8108 wrote:

I was playing with this earlier to see how you did obsolete blocks, to make sure I agreed with you: but you seem to have just put the block's text.

The only nice way I can think of doing them is as booleans — "<obsolete!>" — so that they get colored red:

if <(join <obsolete!> []) = [a ScratchSpriteMorph()]>
And I'd also suggest adding indentation, so blocks inside the mouth of a C-block are indented one tab, and so on.  smile

obsolete blocks are rendered as just text because there are really no exceptions to any block in my code: what's written on the block comes out as scratchblocks as it is. It's a pity obsolete reporters aren't really reporters... but who would want to use that anyway  tongue

I agree with the indenting, but it would take an absolute overhaul of the system (well, really just renaming the functions to add another argument) but that would mean current users of my plugin would have duplicate functions in their copy of Scratch. Besides, it's not that important.

Offline

 

#69 2012-08-23 10:08:02

taddl
Scratcher
Registered: 2009-03-08
Posts: 100+

Re: Fully functional plugin to create scratchblocks code within Scratch!


say [this is awesome, thank you!]


http://blocks.scratchr.org/API.php?action=projects&amp;type=newest&amp;return=image&amp;user=taddl
http://blocks.scratchr.org/API.php?user=taddl&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1

Offline

 

#70 2012-08-23 10:11:44

taddl
Scratcher
Registered: 2009-03-08
Posts: 100+

Re: Fully functional plugin to create scratchblocks code within Scratch!

but it doesen't work in other languages...
I tried it in german, and I got this:


sage [this is awesome, thank you!]

but I have set the language option to english anyway...


http://blocks.scratchr.org/API.php?action=projects&amp;type=newest&amp;return=image&amp;user=taddl
http://blocks.scratchr.org/API.php?user=taddl&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1

Offline

 

#71 2012-08-23 11:09:02

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

taddl wrote:

but it doesen't work in other languages...

@LS97: Reasons not to simply take the text on the block...  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#72 2012-08-23 11:59:23

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

blob8108 wrote:

taddl wrote:

but it doesen't work in other languages...

@LS97: Reasons not to simply take the text on the block...  tongue

Lol.  tongue


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#73 2012-08-23 12:38:58

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

MathWizz wrote:

blob8108 wrote:

taddl wrote:

but it doesen't work in other languages...

@LS97: Reasons not to simply take the text on the block...  tongue

Lol.  tongue

Well well well... it's the forum's fault that they don't support all languages  tongue
I actually think it's a nice advantage, since you can always change the language to English, but can have (red coloured) blocks in your own language to use in other language forums!  big_smile

Offline

 

#74 2012-08-23 12:40:22

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

LS97 wrote:

MathWizz wrote:

blob8108 wrote:

@LS97: Reasons not to simply take the text on the block...  tongue

Lol.  tongue

Well well well... it's the forum's fault that they don't support all languages  tongue
I actually think it's a nice advantage, since you can always change the language to English, but can have (red coloured) blocks in your own language to use in other language forums!  big_smile

...not a bug, but an undocumented feature?

BTW, you posted 3 seconds after me (mine is in a different thread.)

Last edited by MathWizz (2012-08-23 12:40:29)


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#75 2012-08-23 13:17:23

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Fully functional plugin to create scratchblocks code within Scratch!

MathWizz wrote:

LS97 wrote:

MathWizz wrote:


Lol.  tongue

Well well well... it's the forum's fault that they don't support all languages  tongue
I actually think it's a nice advantage, since you can always change the language to English, but can have (red coloured) blocks in your own language to use in other language forums!  big_smile

...not a bug, but an undocumented feature?

exactly!

BTW, you posted 3 seconds after me (mine is in a different thread.)

Ok... nice to know but doesn't that happen quite often?  hmm

Offline

 
  • Index
  •  » Advanced Topics
  •  » Fully functional plugin to create scratchblocks code within Scratch!

Board footer