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

#2751 2012-04-18 10:07:51

pjtnt11
Scratcher
Registered: 2011-08-13
Posts: 12

Re: ITopic: Welcome to your local block library!

Splodgey wrote:

pjtnt11 wrote:

Where do you put the code?

when gf clicked
repeat until <(You know where to put the code?) = [true]>
  say [Where do you put the code?]
end

Corrected grammar. Sorry, I couldn't resist.

Thanks!!!

Offline

 

#2752 2012-04-18 16:34:37

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

Re: ITopic: Welcome to your local block library!

pjtnt11 wrote:

Code:

blockspec: ('open gallery number %s ' #- #Gallerylink:)

Code:

code:Gallerylink: t1
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/galleries/view/' , t1 asString]

what is does: it makes you go to the gallery number you put in.

I think it would be better to use %n, not %s.   hmm

Offline

 

#2753 2012-04-18 16:46:42

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Also, a block librarian should fix the top of the library--it still says to install antidote  hmm


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#2754 2012-04-18 17:02:08

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

Re: ITopic: Welcome to your local block library!

bobbybee wrote:

Also, a block librarian should fix the top of the library--it still says to install antidote  hmm

The reason we're not touching it is because the moment one of the posts is edited, all the invalid images in it will stop working...   sad

Offline

 

#2755 2012-04-18 19:49:44

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Yeah. I'm gonna send nXIII another email, see what he's doing!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2756 2012-04-18 19:55:38

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

bobbybee wrote:

Also, a block librarian should fix the top of the library--it still says to install antidote  hmm

The reason we're not touching it is because the moment one of the posts is edited, all the invalid images in it will stop working...   sad

You still need to transfer hosts, huh.  hmm


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#2757 2012-04-18 20:00:20

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

Re: ITopic: Welcome to your local block library!

bobbybee wrote:

Greenatic wrote:

bobbybee wrote:

Also, a block librarian should fix the top of the library--it still says to install antidote  hmm

The reason we're not touching it is because the moment one of the posts is edited, all the invalid images in it will stop working...   sad

You still need to transfer hosts, huh.  hmm

We've got a few transferred, but we're hesitating before doing a full update, due to the possibility of a blockspec-to-image API.

Offline

 

#2758 2012-04-18 20:01:26

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

bobbybee wrote:

Greenatic wrote:


The reason we're not touching it is because the moment one of the posts is edited, all the invalid images in it will stop working...   sad

You still need to transfer hosts, huh.  hmm

We've got a few transferred, but we're hesitating before doing a full update, due to the possibility of a blockspec-to-image API.

Would it be possible to leverage JSO's parser? Just a thought.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#2759 2012-04-18 20:12:32

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

bobbybee wrote:

Greenatic wrote:

bobbybee wrote:


You still need to transfer hosts, huh.  hmm

We've got a few transferred, but we're hesitating before doing a full update, due to the possibility of a blockspec-to-image API.

Would it be possible to leverage JSO's parser? Just a thought.

It would certainly be possible, however his is designed to colour any unknown blocks red, so that would take a lot of editing to change this, I think, plus it can't draw booleans, which I think is a major flaw! However, nXIII worked on a similar system which could be more suited to our needs - we're waiting to see what comes up with!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2760 2012-04-18 20:32:25

Jrocket97
Scratcher
Registered: 2009-10-03
Posts: 100+

Re: ITopic: Welcome to your local block library!

Where do codes go?  and how come when I resurrected obsolete blocks involving graphic effects (change color by 10, set whirl to 0, change pointillize by 10, etc.) most of the graphic effects just stopped working?

Last edited by Jrocket97 (2012-04-19 21:48:13)

Offline

 

#2761 2012-04-20 13:28:05

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

YourLocalBlockLib wrote:

http://scratch.mit.edu/redirect/url?lin … 678216.gifShared by johnnydean1
Block number: [25]    [view source] [What is this?]
Notes:
Converts a string to a list, starting a new line using a chosen breaker as a marker.

Could you turn this into a reporter, and make the value it reports A list please? (I have no understanding of Sqeak Smalltalk) - like BYOB?

Last edited by DigiTechs (2012-04-20 13:29:08)


I'm back.
Maybe.

Offline

 

#2762 2012-04-20 20:52:25

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

YourLocalBlockLib wrote:

http://scratch.mit.edu/redirect/url?lin … 678216.gifShared by johnnydean1
Block number: [25]    [view source] [What is this?]
Notes:
Converts a string to a list, starting a new line using a chosen breaker as a marker.

Could you turn this into a reporter, and make the value it reports A list please? (I have no understanding of Sqeak Smalltalk) - like BYOB?

You can't report lists in Panther because lists in Panther are not first class.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#2763 2012-04-21 04:05:27

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

nathanprocks wrote:

DigiTechs wrote:

YourLocalBlockLib wrote:

http://scratch.mit.edu/redirect/url?lin … 678216.gifShared by johnnydean1
Block number: [25]    [view source] [What is this?]
Notes:
Converts a string to a list, starting a new line using a chosen breaker as a marker.

Could you turn this into a reporter, and make the value it reports A list please? (I have no understanding of Sqeak Smalltalk) - like BYOB?

You can't report lists in Panther because lists in Panther are not first class.

Oh. If only they were. I could then use it for a project I'm making.


I'm back.
Maybe.

Offline

 

#2764 2012-04-21 12:57:20

l-drago100000
Scratcher
Registered: 2011-10-24
Posts: 58

Re: ITopic: Welcome to your local block library!

Can I have an " Open browser with URL: ( insert website here) block?


http://img33.imageshack.us/img33/5867/ld1j.png Now testing Scratch Beta 2.0.

Offline

 

#2765 2012-04-21 13:00:48

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: ITopic: Welcome to your local block library!

l-drago100000 wrote:

Can I have an " Open browser with URL: ( insert website here) block?

they made it already...


http://pekkit.net/banners/pekkit.png

Offline

 

#2766 2012-04-21 15:24:50

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

l-drago100000 wrote:

Can I have an " Open browser with URL: ( insert website here) block?

Squawkers13 is right, and to elaborate, the block can be found here:

Scratch block

Panther block block number: [2]


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2767 2012-04-21 17:52:26

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: ITopic: Welcome to your local block library!

Code:

delete line# of list $List$

need it for Panther... and needs to work for all lines!


http://pekkit.net/banners/pekkit.png

Offline

 

#2768 2012-04-21 18:00:55

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: ITopic: Welcome to your local block library!

Can't you just use the delete item (1) of list [list] block?


http://i.imgur.com/zeIZW.png

Offline

 

#2769 2012-04-21 18:04:43

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Squawkers13 wrote:

Code:

delete line# of list $List$

need it for Panther... and needs to work for all lines!

Yup! As rookwood points out, the

line (1 v) of list [list v]
block's dropdown can be typed into, giving an exact list number or a variable can be dropped in to set it that way:
line (variable) of list [list v]


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2770 2012-04-22 07:27:28

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

Could someone make me a "Save image for end user" block and a "Save Project at directory $String$" block - I really need these for somthing I'm making.
EDIT: The "Save Project at directory $String$" block saves where you enter in the String imput. The "Save image for end user" block is just so I can save my panther.image with custom blocks - so I don't get the warning about custom blocks every time I open my project (It's really annoying.) EDIT2: I'll make some images up;

Save Project at directory [location]
end
Save image for end user

Last edited by DigiTechs (2012-04-22 09:33:42)


I'm back.
Maybe.

Offline

 

#2771 2012-04-22 08:31:29

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

Could someone make me a "Save image for end user" block and a "Save Project at directory $String$" block - I really need these for somthing I'm making.

I could.

1st

Code:

dreamod
save image for end user
-
#E6A822
| t1 |
t1 _ (self ownerThatIsA: ScratchFrameMorph).
t1 ifNotNil: [t1 saveImageForEndUser].

2nd

Code:

dreamod
save project at directory $String$
-
#E6A822
    | t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

Offline

 

#2772 2012-04-22 09:34:13

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

dreamod wrote:

DigiTechs wrote:

Could someone make me a "Save image for end user" block and a "Save Project at directory $String$" block - I really need these for somthing I'm making.

I could.

1st

Code:

dreamod
save image for end user
-
#E6A822
| t1 |
t1 _ (self ownerThatIsA: ScratchFrameMorph).
t1 ifNotNil: [t1 saveImageForEndUser].

2nd

Code:

dreamod
save project at directory $String$
-
#E6A822
    | t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

Thanks!
EDIT: The save project at directory block seemed to crash my Panther - it isn't responding.

Last edited by DigiTechs (2012-04-22 09:38:05)


I'm back.
Maybe.

Offline

 

#2773 2012-04-22 10:02:13

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

dreamod wrote:

DigiTechs wrote:

Could someone make me a "Save image for end user" block and a "Save Project at directory $String$" block - I really need these for somthing I'm making.

I could.

1st

Code:

dreamod
save image for end user
-
#E6A822
| t1 |
t1 _ (self ownerThatIsA: ScratchFrameMorph).
t1 ifNotNil: [t1 saveImageForEndUser].

2nd

Code:

dreamod
save project at directory $String$
-
#E6A822
    | t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

Thanks!
EDIT: The save project at directory block seemed to crash my Panther - it isn't responding.

It worked for me. sorry.

Offline

 

#2774 2012-04-22 10:58:09

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

Re: ITopic: Welcome to your local block library!

dreamod wrote:

DigiTechs wrote:

dreamod wrote:


I could.

1st

Code:

dreamod
save image for end user
-
#E6A822
| t1 |
t1 _ (self ownerThatIsA: ScratchFrameMorph).
t1 ifNotNil: [t1 saveImageForEndUser].

2nd

Code:

dreamod
save project at directory $String$
-
#E6A822
    | t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

Thanks!
EDIT: The save project at directory block seemed to crash my Panther - it isn't responding.

It worked for me. sorry.

Looks like there's a typo:

Code:

| t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.

Try this (I haven't tested it):

Code:

dreamod (improved by Greenatic)
save project at directory $String$
-
#E6A822
    |t1 t2 t3|
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

Offline

 

#2775 2012-04-22 12:01:17

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

dreamod wrote:

DigiTechs wrote:

Thanks!
EDIT: The save project at directory block seemed to crash my Panther - it isn't responding.

It worked for me. sorry.

Looks like there's a typo:

Code:

| t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.

Try this (I haven't tested it):

Code:

dreamod (improved by Greenatic)
save project at directory $String$
-
#E6A822
    |t1 t2 t3|
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

That wasn't a typo. t3 is supposed to store a string with text that is going to be interpreted as code for a ScratchFrameMorph, The string quotes are supposed to be there.

Offline

 

Board footer