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

#1 2011-08-03 22:50:55

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

file extension change HELP!!

Kitcat 1.3 is in the works, and I want to change the file extension for it (currently .sb). Don't be smart about this and give me the wrong stuff on how to change the file type from .sb to .sb.blahblahblah, I want to know how to make it change from .sb to .kct NOT .sb.kct (I don't like it) so HELP!!!!


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#2 2011-08-03 23:09:04

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: file extension change HELP!!

go to a folder, any folder and click on the tools and then folder options. go to view and unchec something about hiding the extension then click apply to all folders then change the extension by renaming it.


http://i47.tinypic.com/rrqe13.gif

Offline

 

#3 2011-08-04 01:20:34

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: file extension change HELP!!

Is that what the Panther peeps did? I just want Kitcat to save projects as .kct


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#4 2011-08-04 02:59:07

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

Re: file extension change HELP!!

i found a thing in the browser a few weeks ago to change it, but im not using my laptop so i can't get on to it right now


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

Offline

 

#5 2011-08-04 03:15:43

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

Re: file extension change HELP!!

found it!

Code:

ScratchFrameMorph>>saveScratchProject
fName _ (self nameFromFileName: fName), '.sb'. "Change .sb to your file extension"

ScratchFrameMorph>>saveScratchProjectNoDialog
(fName size = 0 | (dir fileExists: fName , '.sb') not) ifTrue: [^ self saveScratchProject]. "Again change .sb"
projectName _ FileDirectory localNameFor: (fName, '.sb').  "Once again change .sb"

ScratchFrameMorph>>nameFromFileName:
"Add this line change .sb to your file extension also change 3 to the length of your extension"
(s asLowercase endsWith: '.sb') ifTrue: [s _ s copyFrom: 1 to: s size - 3].

ScratchFileChooserDialog>>createScratchFileChooserFor:saving:
list _ ScratchFilePicker new extensions: #(scratch sb). "Add your extension"

Credit to wcfs96 for that.


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

Offline

 

#6 2011-08-04 11:53:21

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: file extension change HELP!!

thanks, I'll try it


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#7 2011-08-04 16:22:52

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: file extension change HELP!!

nathanprocks wrote:

found it!

Code:

ScratchFrameMorph>>saveScratchProject
fName _ (self nameFromFileName: fName), '.sb'. "Change .sb to your file extension"

ScratchFrameMorph>>saveScratchProjectNoDialog
(fName size = 0 | (dir fileExists: fName , '.sb') not) ifTrue: [^ self saveScratchProject]. "Again change .sb"
projectName _ FileDirectory localNameFor: (fName, '.sb').  "Once again change .sb"

ScratchFrameMorph>>nameFromFileName:
"Add this line change .sb to your file extension also change 3 to the length of your extension"
(s asLowercase endsWith: '.sb') ifTrue: [s _ s copyFrom: 1 to: s size - 3].

ScratchFileChooserDialog>>createScratchFileChooserFor:saving:
list _ ScratchFilePicker new extensions: #(scratch sb). "Add your extension"

Credit to wcfs96 for that.

I tried it and it makes .sb.kct instead of .kct


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#8 2012-05-16 16:04:53

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

Re: file extension change HELP!!

GP1 wrote:

Kitcat 1.3 is in the works, and I want to change the file extension for it (currently .sb). Don't be smart about this and give me the wrong stuff on how to change the file type from .sb to .sb.blahblahblah, I want to know how to make it change from .sb to .kct NOT .sb.kct (I don't like it) so HELP!!!!

There used to be a thread like this somewhere that I posted on... I'll try to get it from the midst of my post archive cause I answered it.
EDIT: I decided to be nice and not make you click any links  tongue
EDIT2: I'm not sure if this works though  hmm   I never got around to testing

SJRCS_011 wrote:

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

importScratchProject

Code:

extensions: #(scratch sb kct)

nameFromFileName: fileName: add line

Code:

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

saveScratchProject: change

Code:

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

to

Code:

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

saveScratchProjectNoDialog: change '.sb' on line 9 and 15 to '.kct'

Last edited by SJRCS_011 (2012-05-16 16:11:32)


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

Offline

 

#9 2012-05-30 09:48:59

williambl
Scratcher
Registered: 2011-04-08
Posts: 100+

Re: file extension change HELP!!

SJRCS_011 wrote:

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

importScratchProject

Code:

extensions: #(scratch sb kct)

nameFromFileName: fileName: add line

Code:

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

saveScratchProject: change

Code:

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

to

Code:

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

saveScratchProjectNoDialog: change '.sb' on line 9 and 15 to '.kct'

Hmm... that lets you save but not open custom extension projects.


http://internetometer.com/imagesmall/34650.png
http://www.danasoft.com/sig/Epicnesssign.jpg

Offline

 

#10 2012-05-30 14:01:50

lallaway12
Scratcher
Registered: 2012-01-04
Posts: 500+

Re: file extension change HELP!!

Please!


http://i49.tinypic.com/2re4ied.png

Offline

 

Board footer