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

#1 2010-07-12 21:38:31

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Working on a compiler, need a bit of help?

So I was messing around one day, and playing with the alt+f4 feature that exits a program. So I was running a scratch program in presentation mode with fill screen off, and I pressed at+f4. it then asked me if i wanted to save the image file and I clicked yes. So, when I started scratch, it opened up into that project in presentation mode! I knew I had just figured out a way past the .sb to .exe or .app barrier. My new compiling mod is almost done, I just need a little bit of help.

Could someone teach me how to mess with the source code to make it so pressing 'esc' in presentation mode will close scratch instead of exiting pres mode, and tell me how to make the curly arrow that exits pres mode exit scratch instead? thank you.

Last edited by midnightleopard (2010-07-12 21:38:59)


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#2 2010-07-13 03:11:21

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Working on a compiler, need a bit of help?

Ok first look through the mods and find a:
close (mod name e.g Scratch) block

Youve now done the easy bit!

Now somewhere in the source (Maybe Scratch-UI something) there is the code for the arrow. Replace it with the code from the mod and when you click the arrow you should quit Scratch.


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2010-07-13 07:14:56

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Working on a compiler, need a bit of help?

Very clever...


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#4 2010-07-13 08:27:49

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Working on a compiler, need a bit of help?

johnnydean1 wrote:

Ok first look through the mods and find a:
close (mod name e.g Scratch) block

Youve now done the easy bit!

Now somewhere in the source (Maybe Scratch-UI something) there is the code for the arrow. Replace it with the code from the mod and when you click the arrow you should quit Scratch.

not so much a mod, I haven't changed anything in scratch, just added a new menu.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#5 2010-07-13 08:33:31

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Working on a compiler, need a bit of help?

okay.. I got the method, but now I need a method that quits scratch.

Last edited by midnightleopard (2010-07-13 08:43:17)


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#6 2010-07-13 12:13:43

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Working on a compiler, need a bit of help?

well yes look through other mods and find a [quite |Mod name|] block. Get the code and use it when the arrows pressed.


You can now reach me on Twitter @johnnydean1_

Offline

 

#7 2010-07-13 12:41:27

bigreader
Scratcher
Registered: 2007-08-14
Posts: 100+

Re: Working on a compiler, need a bit of help?

Turn fill screen off or enable programmer facilities, then go into presentation mode and right click on the return arrow twice. Click on the red button to bring up a menu, then click "change action selector". Change "exitPresentation" to "quitScratch", then accept.

Writing this from memory, so fool around if it doesn't work.  smile

Last edited by bigreader (2010-07-13 12:42:30)


I'm currently taking a break from Scratch.
Zing - now even easier to install!

Offline

 

#8 2010-07-13 13:04:46

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Working on a compiler, need a bit of help?

bigreader wrote:

Turn fill screen off or enable programmer facilities, then go into presentation mode and right click on the return arrow twice. Click on the red button to bring up a menu, then click "change action selector". Change "exitPresentation" to "quitScratch", then accept.

Writing this from memory, so fool around if it doesn't work.  smile

quitScratch is not a method.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#9 2010-07-13 17:10:39

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Working on a compiler, need a bit of help?

midnightleopard wrote:

bigreader wrote:

Turn fill screen off or enable programmer facilities, then go into presentation mode and right click on the return arrow twice. Click on the red button to bring up a menu, then click "change action selector". Change "exitPresentation" to "quitScratch", then accept.

Writing this from memory, so fool around if it doesn't work.  smile

quitScratch is not a method.

It worked for me whenI was playing around before.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#10 2010-07-13 19:49:50

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Working on a compiler, need a bit of help?

I tried inspecting the morph, changing it's action selector to 'quitScratch' and I got an error. What else should I do?

and btw, I read somewhere that you where making a compiler for panther, perhaps you could use an idea like mine. (exporting the project in presentation mode as an image file, then bundling it with a vm and all necessary plugins, then making the 'esc' key and the arrow button quit the program.

Last edited by midnightleopard (2010-07-13 19:55:28)


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#11 2010-07-14 07:46:40

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Working on a compiler, need a bit of help?

midnightleopard wrote:

I tried inspecting the morph, changing it's action selector to 'quitScratch' and I got an error. What else should I do?

and btw, I read somewhere that you where making a compiler for panther, perhaps you could use an idea like mine. (exporting the project in presentation mode as an image file, then bundling it with a vm and all necessary plugins, then making the 'esc' key and the arrow button quit the program.

No thanks, I'm tryng to mod Jens' Scratch2exe, having a bit of trouble, but i'll work it out eventualy.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer