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

#1 2013-01-19 15:47:45

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Version information from Scratch file

Is there a way to find what version (number) of Scratch made a project file? I know about the header, but that's the same for most versions of Scratch so it's not really that helpful.

Last edited by veggieman001 (2013-01-19 15:47:59)


Posts: 20000 - Show all posts

Offline

 

#2 2013-01-19 15:49:55

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

Re: Version information from Scratch file

Yup. For 2.0, unzip the file, and check project.json. it'll say at the bottom.

For 1.*, look in a hex-editor, it'll be there, just scroll down a tad.

Or you can send me the file, and I'll do it for ya  tongue


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

Offline

 

#3 2013-01-19 15:54:57

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

Re: Version information from Scratch file

Using Kurt:

Code:

In [1]: import kurt

In [2]: project = kurt.ScratchProjectFile("tests/game.sb")

In [3]: project.info
Out[3]: 
{'author': u'blob8108',
 'comment': u'This is a game I made!',
 'history': '2012-3-21 19:29:57\tsave\tgame\t\t\r2012-3-21 19:31:11\tsave\tgame\t\t\r2012-3-21 19:31:25\tsave\tgame\t\t\r2012-3-21 19:37:18\tsave\tgame\t\t\r2012-3-21 19:38:01\tsave\tgame\t\t\r2012-3-21 19:41:18\tsave\tgame\t\t\r2012-3-21 19:42:10\tsave\tgame\t\t\r',
 'isHosting': True,
 'language': 'en',
 'os-version': '1073',
 'platform': 'Mac OS',
 'scratch-version': '1.4 of 30-Jun-09',
 'thumbnail': <Image(game thumbnail)>}

In [4]: project.info['scratch-version']
Out[4]: '1.4 of 30-Jun-09'

smile  [NB: this is actually Python; the prompts are different because I'm using IPython]

Last edited by blob8108 (2013-01-19 16:01:06)


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

Offline

 

#4 2013-01-19 16:10:45

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

blob8108 wrote:

Using Kurt:

Code:

In [1]: import kurt

In [2]: project = kurt.ScratchProjectFile("tests/game.sb")

In [3]: project.info
Out[3]: 
{'author': u'blob8108',
 'comment': u'This is a game I made!',
 'history': '2012-3-21 19:29:57\tsave\tgame\t\t\r2012-3-21 19:31:11\tsave\tgame\t\t\r2012-3-21 19:31:25\tsave\tgame\t\t\r2012-3-21 19:37:18\tsave\tgame\t\t\r2012-3-21 19:38:01\tsave\tgame\t\t\r2012-3-21 19:41:18\tsave\tgame\t\t\r2012-3-21 19:42:10\tsave\tgame\t\t\r',
 'isHosting': True,
 'language': 'en',
 'os-version': '1073',
 'platform': 'Mac OS',
 'scratch-version': '1.4 of 30-Jun-09',
 'thumbnail': <Image(game thumbnail)>}

In [4]: project.info['scratch-version']
Out[4]: '1.4 of 30-Jun-09'

smile  [NB: this is actually Python; the prompts are different because I'm using IPython]

Thanks a lot!


Posts: 20000 - Show all posts

Offline

 

#5 2013-01-19 16:46:30

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

I got the following error when I tried to do that  hmm

Code:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\kurt-1.4.5-py2.7.egg\kurt\files.py", line
148, in __init__
    BinaryFile.__init__(self, *args, **kwargs)
  File "C:\Python27\lib\site-packages\kurt-1.4.5-py2.7.egg\kurt\files.py", line
55, in __init__
    self.load()
  File "C:\Python27\lib\site-packages\kurt-1.4.5-py2.7.egg\kurt\files.py", line
74, in load
    self._load(bytes)
  File "C:\Python27\lib\site-packages\kurt-1.4.5-py2.7.egg\kurt\files.py", line
151, in _load
    project = self._construct.parse(bytes)
  File "C:\Python27\lib\site-packages\construct-2.06-py2.7.egg\construct\core.py
", line 181, in parse
    return self.parse_stream(StringIO(data))
  File "C:\Python27\lib\site-packages\construct-2.06-py2.7.egg\construct\core.py
", line 191, in parse_stream
    return self._parse(stream, Container())
  File "C:\Python27\lib\site-packages\construct-2.06-py2.7.egg\construct\core.py
", line 645, in _parse
    subobj = sc._parse(stream, context)
  File "C:\Python27\lib\site-packages\construct-2.06-py2.7.egg\construct\core.py
", line 279, in _parse
    return self._decode(self.subcon._parse(stream, context), context)
  File "C:\Python27\lib\site-packages\construct-2.06-py2.7.egg\construct\adapter
s.py", line 331, in _decode
    raise ConstError("expected %r, found %r" % (self.value, obj))
construct.adapters.ConstError: expected 'ScratchV02', found 'ScratchV01'

Posts: 20000 - Show all posts

Offline

 

#6 2013-01-19 17:01:05

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

Re: Version information from Scratch file

It's an older file. You'll have to use a hex approach. (or, again, send the file to me)


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

Offline

 

#7 2013-01-19 17:04:20

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

bobbybee wrote:

It's an older file. You'll have to use a hex approach. (or, again, send the file to me)

How would I find it in a hex editor?

Edit: I did some more poking around, and I'm pretty sure there's no version string.  See below.

Last edited by veggieman001 (2013-01-19 17:22:12)


Posts: 20000 - Show all posts

Offline

 

#8 2013-01-19 17:19:22

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

Re: Version information from Scratch file

veggieman001 wrote:

construct.adapters.ConstError: expected 'ScratchV02', found 'ScratchV01'

Can you send me the .sb file? I'd like to debug that  smile


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

Offline

 

#9 2013-01-19 17:21:21

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

blob8108 wrote:

veggieman001 wrote:

construct.adapters.ConstError: expected 'ScratchV02', found 'ScratchV01'

Can you send me the .sb file? I'd like to debug that  smile

Here you go


Posts: 20000 - Show all posts

Offline

 

#10 2013-01-19 17:49:29

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

Re: Version information from Scratch file

Checked with 2.0, no version.


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

Offline

 

#11 2013-01-19 17:49:31

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

Re: Version information from Scratch file

veggieman001 wrote:

blob8108 wrote:

veggieman001 wrote:

construct.adapters.ConstError: expected 'ScratchV02', found 'ScratchV01'

Can you send me the .sb file? I'd like to debug that  smile

Here you go

I'm thinking that's a Scratch 1.2 file. Scratch 1.3 uses ScratchV02, so it must be earlier.


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

Offline

 

#12 2013-01-19 17:50:48

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

blob8108 wrote:

veggieman001 wrote:

blob8108 wrote:


Can you send me the .sb file? I'd like to debug that  smile

Here you go

I'm thinking that's a Scratch 1.2 file. Scratch 1.3 uses ScratchV02, so it must be earlier.

No, it's older. The latest it could be from is 2005.


Posts: 20000 - Show all posts

Offline

 

#13 2013-01-19 17:52:51

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

Re: Version information from Scratch file

veggieman001 wrote:

blob8108 wrote:

veggieman001 wrote:

Here you go

I'm thinking that's a Scratch 1.2 file. Scratch 1.3 uses ScratchV02, so it must be earlier.

No, it's older. The latest it could be from is 2005.

I didn't say it wasn't older  tongue

But yeah; I just checked using Kurt:
* the file I just saved with v1.2 has 'scratch-version': '1.2.1 (6-Dec-07)'.
* your file doesn't have a scratch-version at all.

EDIT: yup, file.sb's info table just contains:
{'thumbnail': <Image(file thumbnail)>}

Must be pre-1.2, then!  smile

Last edited by blob8108 (2013-01-19 17:54:55)


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

Offline

 

#14 2013-01-19 17:56:04

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

Haha, okay then. Well, thanks anyway. It's cool to know the info about this, at least.


Posts: 20000 - Show all posts

Offline

 

#15 2013-01-19 17:56:39

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

Re: Version information from Scratch file

Oooh, what's obsoleteSavedState? I've never seen one of those before...

Code:

In [9]: project.stage.fields
Out[9]: 
{'bounds': Rectangle([0, 0, 480, 360]),
 'color': Color(0, 627, 1023),
 'costume': <Image(underwater)>,
 'flags': 2,
 'hPan': 0,
 'isClone': False,
 'lists': {},
 'media': [],
 'name': 'Background',
 'obsoleteSavedState': [123, 0, 100, 50, <Form(160x120)>, ''],
 'owner': None,
 'properties': None,
 'sceneStates': {},
 'scripts': [],
 'sprites': [],
 'submorphs': [<Sprite(goldfish 2)>,
  <Sprite(goldfish 3)>,
  <Sprite(hungry fish)>,
  <Sprite(goldfish 1)>,
  <Sprite(instructions)>],
 'tempoBPM': 60,
 'vPan': 0,
 'variables': {},
 'volume': 100,
 'zoom': 100}

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

Offline

 

#16 2013-01-20 02:48:53

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: Version information from Scratch file

There is a problem here. I took a look into the file and discovered it used the "look like" block from 0.2, but the "broadcast" block from 1.0.

This is very interesting, perhaps from a development version, maybe 0.3?

Offline

 

#17 2013-01-20 12:25:05

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

Gravitation wrote:

There is a problem here. I took a look into the file and discovered it used the "look like" block from 0.2, but the "broadcast" block from 1.0.

This is very interesting, perhaps from a development version, maybe 0.3?

Well, lookLike is the name of the blockspec of switch to costume in 1.0.
So we can't really know how old it is, except from October 2005 at the latest.

except...
It may be the same version of the project here. This is possible because they left the projects backward compatible by just changing the name of the block instead of the name of the blockspec. This would date it to sometime in 2004, as the version shown there is likely "0.2" (although they didn't really have version numbers back then).


Posts: 20000 - Show all posts

Offline

 

#18 2013-01-22 09:05:36

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Version information from Scratch file

veggieman001 wrote:

Gravitation wrote:

There is a problem here. I took a look into the file and discovered it used the "look like" block from 0.2, but the "broadcast" block from 1.0.

This is very interesting, perhaps from a development version, maybe 0.3?

Well, lookLike is the name of the blockspec of switch to costume in 1.0.
So we can't really know how old it is, except from October 2005 at the latest.

except...
It may be the same version of the project here. This is possible because they left the projects backward compatible by just changing the name of the block instead of the name of the blockspec. This would date it to sometime in 2004, as the version shown there is likely "0.2" (although they didn't really have version numbers back then).

You didn't tell me you found SBs!

Offline

 

#19 2013-01-22 09:17:18

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

scimonster wrote:

veggieman001 wrote:

Gravitation wrote:

There is a problem here. I took a look into the file and discovered it used the "look like" block from 0.2, but the "broadcast" block from 1.0.

This is very interesting, perhaps from a development version, maybe 0.3?

Well, lookLike is the name of the blockspec of switch to costume in 1.0.
So we can't really know how old it is, except from October 2005 at the latest.

except...
It may be the same version of the project here. This is possible because they left the projects backward compatible by just changing the name of the block instead of the name of the blockspec. This would date it to sometime in 2004, as the version shown there is likely "0.2" (although they didn't really have version numbers back then).

You didn't tell me you found SBs!

I didn't??
They weren't really SBs, anyway, they were SCRATCHs!!!


Posts: 20000 - Show all posts

Offline

 

#20 2013-01-22 09:52:33

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Version information from Scratch file

veggieman001 wrote:

scimonster wrote:

veggieman001 wrote:


Well, lookLike is the name of the blockspec of switch to costume in 1.0.
So we can't really know how old it is, except from October 2005 at the latest.

except...
It may be the same version of the project here. This is possible because they left the projects backward compatible by just changing the name of the block instead of the name of the blockspec. This would date it to sometime in 2004, as the version shown there is likely "0.2" (although they didn't really have version numbers back then).

You didn't tell me you found SBs!

I didn't??
They weren't really SBs, anyway, they were SCRATCHs!!!

Oh, you did mention that. Maybe it would work better with the original .SCRATCH?

Offline

 

#21 2013-01-22 09:53:33

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Version information from Scratch file

scimonster wrote:

veggieman001 wrote:

scimonster wrote:


You didn't tell me you found SBs!

I didn't??
They weren't really SBs, anyway, they were SCRATCHs!!!

Oh, you did mention that. Maybe it would work better with the original .SCRATCH?

It's the same file; I just renamed it to change the extension to try to work with Kurt.  tongue


Posts: 20000 - Show all posts

Offline

 

Board footer