Donut-slayer wrote:
hi, me again. It turns out the icons I was using were made on mspaint and therefor not compatible, but I downloaded a random icon editor, made it 16x16 and it works!
well then, congratulations
Offline
Hi, Donut-slayer,
I'm glad you got your icons to work. I thought I had eliminated the "Scratch-frame-flash" which occurs when running a compiled project, well, looks like I'll have to check again. Thanks for telling me about it!
Offline
Does Scratch2EXE work with Scratch 1.3 or higher.
Offline
Yes I use it -0 works great from what I understand the 1.2 version also did screensavers which this one does not
Offline
Hi jasb and Mike_W, Scratch2Exe currently works for any Scratch 1.3.1 projects and earlier. If there is interest in the screensaver plugin I could also update that (hey, if somebody else wants to do it, the NSIS source code is included in the download, it's just a matter of updating some filenames) ...
Offline
Jens wrote:
Hi jasb and Mike_W, Scratch2Exe currently works for any Scratch 1.3.1 projects and earlier. If there is interest in the screensaver plugin I could also update that (hey, if somebody else wants to do it, the NSIS source code is included in the download, it's just a matter of updating some filenames) ...
Thanks Jens.
Offline
Jens wrote:
If there is interest in the screensaver plugin I could also update that (hey, if somebody else wants to do it, the NSIS source code is included in the download, it's just a matter of updating some filenames) ...
There is interest - scratch can build some very cool screen savers.
Offline
Mike_W wrote:
Jens wrote:
If there is interest in the screensaver plugin I could also update that (hey, if somebody else wants to do it, the NSIS source code is included in the download, it's just a matter of updating some filenames) ...
There is interest - scratch can build some very cool screen savers.
Maybe I can give it a shot - can you point me to the source and what I need to build it
Offline
Hi Mike_W,
Its's great that you consider giving the screensaver a shot. The source code for my screensaver is really simple. It's a NSIS file:
Name "Chirp Screensaver"
Caption "Chirp Screensaver"
RequestExecutionLevel user
OutFile "Chirp.scr"
Icon Chirp.ico
!include "FileFunc.nsh"
!insertmacro GetParameters
Var PARM
Function .onInit
SetSilent silent
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Chirp.scr") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +2
Abort
FunctionEnd
InstallDir nil
InstallDirRegKey HKLM "Software\Scratch" "Path"
Section
${GetParameters} $PARM
StrCmp $PARM "/s" +2 0
Abort
StrCmp $INSTDIR "nil" 0 +2
Abort
execWait '"$INSTDIR\scratch.exe" "$INSTDIR\chirp.remix" "presentation"'
SectionEndInstead of the "chirp.remix" image you can take the image file from Scratch2Exe (Or JSO's image from his discScratchR, if you prefer that one).
Cheers.
Offline
Jens wrote:
Hi Mike_W,
Its's great that you consider giving the screensaver a shot. The source code for my screensaver is really simple. It's a NSIS file:Code:
Name "Chirp Screensaver" Caption "Chirp Screensaver" RequestExecutionLevel user OutFile "Chirp.scr" Icon Chirp.ico !include "FileFunc.nsh" !insertmacro GetParameters Var PARM Function .onInit SetSilent silent System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Chirp.scr") i .r1 ?e' Pop $R0 StrCmp $R0 0 +2 Abort FunctionEnd InstallDir nil InstallDirRegKey HKLM "Software\Scratch" "Path" Section ${GetParameters} $PARM StrCmp $PARM "/s" +2 0 Abort StrCmp $INSTDIR "nil" 0 +2 Abort execWait '"$INSTDIR\scratch.exe" "$INSTDIR\chirp.remix" "presentation"' SectionEndInstead of the "chirp.remix" image you can take the image file from Scratch2Exe (Or JSO's image from his discScratchR, if you prefer that one).
Cheers.
I have found and installed NSIS - moved an icon into the directory and when I compile the script I get an out put file. When I click on it I get
Squeak please select an image file. I suspect it relates to your comment about chirp.remix but I really don't understand that.
But when I get this done I will write a how to make a screen saver.
Offline
I have made some more ground - know what it is looking for - don't have it working yet - but wanted to let you know I have the image file in there still not running. It loaded the editor thogh so I am making ground
Offline
You can start out by just using the image file that comes with Scratch (Scratch.image), to find out how it works. Afterwards all you have to do is exchange it with one that exits back to the OS instead of the edit mode). Good luck (and feel free to ask if you're stuck)!
Offline
Jens wrote:
You can start out by just using the image file that comes with Scratch (Scratch.image), to find out how it works. Afterwards all you have to do is exchange it with one that exits back to the OS instead of the edit mode). Good luck (and feel free to ask if you're stuck)!
Am stuck - looking for an image file (or how to build one) that will autorun a given scratch project.
My screensaver brings up the editor.
Which means - my computer now tells me - I have not done anything in a while so how about doing some scratch code.
Offline
Hi Mike_W, you can start up Scratch in presentation mode by using the "presentation" command line option. Under Windows this would be something like:
[path]scratch.exe [path]scratch.image yourproject.sb presentation
(you can also put the "presentation" option before the project file name.
The image file is part of Scratch's executable (it contains the bytecode of the application, and some other stuff), the .exe file is a Squeak virtual machine. Usually you don't create an image "from scratch" but take an existing one and modify it. Existing images which exit back to the OS from presentation can be found in both my Scratch2Exe package, or in JSO's discScratchR. If you know some Squeak you can also tweak the Scratch Source Code image. But to get a feel of how the screensaver idea works I'd start with the normal Scratch.image that's already there on your computer.
Offline
If I understand what I am doing this is the line that I need to understand in the nsi file
execWait '"$INSTDIR\scratch.exe" "$INSTDIR\chirp.remix" "presentation"'
I don't know small talk or squeak (I do code in java, VBA, vb script on a daily basis so learning something does not intimidate me).
or am I totally off base that my problem could be in the NSI file.
Offline
You're quite right! All the NSI file does is compile a tiny launch-app for Scratch, which makes sure that only a single instance of it runs at a time (othewise you would end up with multiple screensavers after a while
).
The part asserting the single-instance process is in the line:
system::Call 'kernel32::CreateMutexA(i 0, i 0, t "Chirp.scr") i .r1 ?e'
You need to replace "Chirp.scr" with whatever the name for your own screensaver will be.
The line that starts Scratch is the one you identified. To try it with the current version of Scratch, just replace the "chirp.remix" part with "Scratch.image". There's your screensaver...
I chose NSI because it lets you create a stand-alone .exe or .scr very easily (I know, that's not what it is meant for, but hey)
Good luck!
Offline
Ok I have it launching scratch and starting my project.
How do I get the project to fully exit - and not return to the editor I have it calling presentation mode but I still get the editor.
Making ground and understanding why - so when I get this all done I will write up a how to - maybe ever write a small program to generate the nsi file.
Offline
Mike_W wrote:
How do I get the project to fully exit - and not return to the editor I have it calling presentation mode but I still get the editor.
To accomplish this you either have to produce an image which does this using the official Scratch Source Code (google for it, it's now in the wiki), or - as I pointed out before - use an existing image which already does that (just take the one from Scratch2Exe, it's a modified current Scratch 1.3.1 image)
Mike_W wrote:
when I get this all done I will write up a how to - maybe ever write a small program to generate the nsi file.
Good idea! BTW this is exactly how Scratch2Exe works: It's a NSI file producing and compiling another NSI file which it encorporates sort of "within itself" (I love such nested Matiroska dolls approaches)
Offline
Success!!! - Now I need to Duplicate, Document, and Create a NSI script builder
my last error was using the image file in the install path
I changed the image file I had in the screen saver directory but did not change
"$INSTDIR\chirp.remix"
Thank for you help Jens.
to point to it.
Offline
Great! You know, if you're more familiar with other programming languages you could probably just build a simple launch app doing essentially the same thing in C or VBA (anything that lets you create an .exe). No need, really, to hijack NSI for this
Offline
It´s a great tool. Wonderful job. I'm an educator who likes to experiment with this sort of thing and I am thinking of creating a website dedicated to simple educational games based on Scratch that I intend to create. The idea is to make available executable Scratch projects using your prototype. It´s just practical.
Versions where you can see the code will also be made available but for example my 6 year old always manages to mess up my code when I leave him alone to play a game I made for him and even saves the changed file LOL so I really like the idea of an executable file.
The applications will of course be free, there is no financial gain. In Portugal we actually have
a local application to share projects but the idea is to make available on my website applications
centered on fun AND education. Although the Scratch file sharing sites ( the main one and the one in Portugal) are great, I think many good projects go unnoticed.
What I want to know is if this is OK specially for downloading just the executable because of copyrights and all that. Is it enough to say that the application so and so was developed on Scratch MIT software and that the prototype compiler you developed was used?
Thanks beforehand for your answer and suggestions!
Offline
Hi Iris_Sophia. Please feel free to download and use my Scratch2Exe utility app as you like!
I'm glad that you find it useful in your work as an educator, even though I admit to having mixed feelings about Scratch2Exe. Not because of any copyright infringements (I'm confident that it adheres to the license, in fact I made sure that a copy of the Scratch Source Code license is included in every .exe it produces), but because of the "code-hiding" implications.
Speaking strictly for myself, I learned nearly everything from others who were willing to share rather than instruct. I also firmly believe that self-motivated copying is an absolutely valid and extremely powerful method of learning by doing again and again ("repetitio est mater studiorum").
However, I also like to wrap up projects in a nice box, and that's one of the reasons I created Scratch2Exe
.
So, enjoy!
Offline
Thank you very much Jens. I am all for sharing code. The thing is for example I want to write
some educational projects just for kids to use ( like spelling objects that appear on the screen)
because they can´t get the "programming" part and executables do come in handy. I will always
make source code available! As soon as I get the time to complete my first "serious" project I'll
upload it.
My web site idea is still about a hundred years away! LOL
You know thousands of kids in elementary school in Portugal now have " Magalhães", the
Portuguese adaptation of one of the first versions of the Classmate pc made
available for 50 euros. There is also a program which makes other laptops available to older kids
for special prices. My point is kids of all ages are having more and more access to computers and
while executables of more complex projects will be better suited for little kids, the older ones
can really learn a lot from source code. I myself am doing that in order to learn!
I am trying to work on an editor which allows user input. The ultimate goal is for handwritten
characters to appear on the screen. Kids in elementary have to use " handwritten" characters
and for example most of Lucinda handwriting characters are quite different, specially
uppercase. Sorry for such a long message. Thanks again!
Offline
That definitely sounds exciting, Iris_Sophia! Say, isn't there a special version of Scratch 1.3.1 around for the Magalhães computer which manages with it's lower resolution? I seem to remember seeing one for PT related to this project.
I like your handwriting idea and am curious to see it! Why don't you just draw a separate costume for each character instad of using a windows font? That way you can make sure that the letters are "correct" for your school (and country) and not just decoration.
Offline
The project you are referring to is at this site http://kids.sapo.pt/scratch/. I actually learned about Scratch and downloaded it from MIT before this project appeared! I haven´t tried to download Scratch from that site, been putting it off because MIT version has Portuguese.
However I want to try it because although the version of Scratch that I have works great on my laptop, on my kid's Magalhães full screen mode doesn´t seem to work and when programming there are visualization problems at bottom or right...
Maybe this doesn´t happen with the "Portuguese" version.
As for the project I'm trying to create, what you suggested is my main goal.However first I will just create costumes editing caracters with Lucinda Handwriting.
After getting user input on the screen ( I'll treat the stage like a sort of 2 dimensional array...)
to display properly I´ll replace the costumes with images of caracters I intend to digitalize from books so they'll come out perfect and "bind" properly when they form a word which I´ll have to do for each character...... The alternative is to draw on paper and digitalize. If I draw on the computer I don´t think I can get them to come out right. Think it's doable?
Thanks for feedback.
By the way the Portuguese website doesn´t have a forum, maybe later on...
Offline