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

#1 2012-01-20 17:25:44

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

how to change the file extensions a mod saves a project as?

^^I need to change the .sb extension to .kn.
Could someone point me to a class/method?


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#2 2012-01-20 17:44:37

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: how to change the file extensions a mod saves a project as?

It's somewhere in ScratchFrameMorph, Instance, file read write I think.

Last edited by SJRCS_011 (2012-01-20 18:20:24)


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#3 2012-01-20 17:51:50

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: how to change the file extensions a mod saves a project as?

SJRCS_011 wrote:

It's somewhere in ScratchFrameMorph, Instance, file i/o I think.

I've looked in most of those, which method exactly?


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#4 2012-01-20 18:29:17

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: how to change the file extensions a mod saves a project as?

Scratch-UI-Panes --> ScratchFrameMorph --> Instance --> file read/write -->

importScratchProject: add you filename in

Code:

extensions: #(scratch sb )

nameFromFileName: fileName: add line

Code:

(s asLowercase endsWith: '.whatever' ifTrue: [s _ s copyFrom: 1 to s size - 3].

saveScratchProject: change

Code:

fName _ (self nameFromFileName: fName), '.sb'.

to

Code:

fName _ (self nameFromFileName: fName), '.whatever'.

saveScratchrojectNoDialog: change '.sb' on line 9 and 15 to '.whatever'


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#5 2012-01-20 18:39:14

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: how to change the file extensions a mod saves a project as?

SJRCS_011 wrote:

Scratch-UI-Panes --> ScratchFrameMorph --> Instance --> file read/write -->

importScratchProject: add you filename in

Code:

extensions: #(scratch sb )

nameFromFileName: fileName: add line

Code:

(s asLowercase endsWith: '.whatever' ifTrue: [s _ s copyFrom: 1 to s size - 3].

saveScratchProject: change

Code:

fName _ (self nameFromFileName: fName), '.sb'.

to

Code:

fName _ (self nameFromFileName: fName), '.whatever'.

saveScratchrojectNoDialog: change '.sb' on line 9 and 15 to '.whatever'

Thanks! I was just missing the last one!
Oh wait, now I need to now how to open .kn files.

Last edited by nickbrickmaster (2012-01-20 18:41:09)


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#6 2012-01-21 12:30:24

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: how to change the file extensions a mod saves a project as?

I got it!
Mods, close this topic.


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#7 2012-01-21 13:22:06

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: how to change the file extensions a mod saves a project as?

nickbrickmaster wrote:

I got it!
Mods, close this topic.

If you want it to be closed, you should report the first post and ask the mods to close the topic.


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#8 2012-01-21 13:29:04

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: how to change the file extensions a mod saves a project as?

Right. I knew that.  tongue


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#9 2012-01-21 14:51:32

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: how to change the file extensions a mod saves a project as?

Closed by request


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer