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)
Offline
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
Offline
Using Kurt:
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'
[NB: this is actually Python; the prompts are different because I'm using IPython]
Last edited by blob8108 (2013-01-19 16:01:06)
Offline
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'[NB: this is actually Python; the prompts are different because I'm using IPython]
Thanks a lot!
Offline
I got the following error when I tried to do that
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'
Offline
It's an older file. You'll have to use a hex approach. (or, again, send the file to me)
Offline
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)
Offline
veggieman001 wrote:
construct.adapters.ConstError: expected 'ScratchV02', found 'ScratchV01'
Can you send me the .sb file? I'd like to debug that
Offline
blob8108 wrote:
veggieman001 wrote:
construct.adapters.ConstError: expected 'ScratchV02', found 'ScratchV01'
Can you send me the .sb file? I'd like to debug that
Offline
Checked with 2.0, no version.
Offline
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
I'm thinking that's a Scratch 1.2 file. Scratch 1.3 uses ScratchV02, so it must be earlier.
Offline
blob8108 wrote:
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.
Offline
veggieman001 wrote:
blob8108 wrote:
veggieman001 wrote:
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
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!
Last edited by blob8108 (2013-01-19 17:54:55)
Offline
Haha, okay then. Well, thanks anyway. It's cool to know the info about this, at least.
Offline
Oooh, what's obsoleteSavedState? I've never seen one of those before...
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}
Offline
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
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).
Offline
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
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!!!
Offline
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
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.
Offline