we should try and make a new editor for the new forum blocks( so you don't have to type them)
when gf clicked if<you like it> say [lets make it!] else ask [why not?] and wait I've made a start reading project summery files :)
Last edited by TRocket (2012-01-28 07:14:21)
Offline
Sounds good! Can you read a sprite's scripts and convert them? Or provide an external editor? I vote for reading a sprite's scripts. Magnie or nXIII might be able to help you out there.
Last edited by Hardmath123 (2012-01-28 05:58:19)
Offline
Hardmath123 wrote:
Sounds good! Can you read a sprite's scripts and convert them? Or provide an external editor? I vote for reading a sprite's scripts. Magnie or nXIII might be able to help you out there.
i think we could read them through their project summaries he is one for a project with the deafault scratch can and then
when gf clicked broadcast [hi v] when gf clicked broadcast [hi v]Project:
Offline
I imagine there is a possibility of reading a project summary and maybe converting the summary into Scratch Forum Blocks. I was also thinking of maybe a Javascript page where you could drag blocks and then the script will output a list of Scratch Forum Blocks "code" which you can also copy and paste into your post.
I may be able to make something in Python, but if we wanted to convert it directly from a Scratch Project, I would need someone to explain the Scratch Project format.
This would be a very useful tool for people that don't want to upload their project, but still get help with it. I like the idea!
Offline
this is the output for magnie's hash:
when green flag clicked
set [alphabet" to "ABCDEFGHIJKLMNOPQRSTUVWXYZ]
ask [Hash Length] and wait
set [length] to (answer)
ask [Fast Hash? ((0)/(1))] and wait
set [fast] to (answer)
ask [Please enter a word or phrase without special letters or spaces.] and wait
set [result" to "]
set [n" to "(1)]
repeat (length of (answer))
set [i" to "(1)]
repeat until ((letter (n) of (answer)) = (letter (i) of (alphabet)))
change [i] by (1)
set [result" to (join (result) (item (i) of "binary] ))
change [n] by (1)
say (result)
delete [all" of "hash]
repeat (length)
add [(1)" to "hash]
set [n" to "(1)]
set [i" to "(1)]
if ((fast) = [(1)]) else
repeat (length of (result))
set [letter] to (letter (i) of (result))
if ((n) = [(1)]) else
set [letter" to ((letter) - (item "last" of "hash] ))
else
set [letter" to ((letter) - (item ((n) - (1)) of "hash] ))
replace item (n) of [hash] with ((letter) mod (9))
change [i] by (1)
set [n] to (((n) + (1)) mod (length))
say (hash)
else
repeat (length of [hash] )
set [i" to "(1)]
repeat (length of (result))
set [letter] to ((letter (i) of (result)) * (length of (result)))
if ((n) = [(1)]) else
set [letter" to ((letter) - (item "last" of "hash] ))
else
set [letter" to ((letter) - (item ((n) - (1)) of "hash] ))
replace item (n) of [hash] with ((letter) mod (9))
change [i] by (1)
set [n] to (((n) + (1)) mod (length))
say (hash)
end
Last edited by TRocket (2012-01-29 07:44:16)
Offline
TRocket wrote:
notice the repeat else block
![]()
That's because of misformatted code:
if <(n)=[1]> blah else blah
<(n)=[1]> NOT ((n) = [1])
Last edited by Hardmath123 (2012-01-29 08:44:57)
Offline
That's pretty interesting. Though, as you can probably see, there are some that need some fixing up. The quotes need to be turned into the [ and ]. The operators need to be switched to < and >. And that if-else needs to be fixed.
Hmm, what language is this coded in? Can you post the source?
Offline
TRocket wrote:
notice the repeat else block
![]()
Notice that there are two of "else"? It's not a normal IF or REPEAT block as I know it.
EDIT: Example with if block
if <(5) > (1)> blocks here . . . else moar blocks here . . . else what . . . a second else end
Last edited by rdococ (2012-01-30 03:55:47)
Offline
Magnie wrote:
I may be able to make something in Python, but if we wanted to convert it directly from a Scratch Project, I would need someone to explain the Scratch Project format.
![]()
I have some Python code I've been meaning to upload that can read/write scratch .sprite files, and project files too, I think. It's written using the awesome Construct library, which is a must for something like this. My code is still a little funny about writing images embedded in the Scratch files, but I think it would work well enough for reading scripts. I must upload it sometime soon...
If you do decide to write your own, take a look at the wiki I made that collects a lot of info on the Scratch format in one place.
Offline
Magnie wrote:
That's pretty interesting. Though, as you can probably see, there are some that need some fixing up. The quotes need to be turned into the [ and ]. The operators need to be switched to < and >. And that if-else needs to be fixed.
Hmm, what language is this coded in? Can you post the source?
this is coded in JAVA i will post the library for reading project summarys soon
Offline