My friend and I are making a project that uses scratch through a batch file.
What are all the parameters we can use for scratch.exe?
Offline
All of the command line parameters Scratch looks for are found below (I know because I checked the source).
- "presentation" makes scratch go into presentation mode
- "fullscreen" makes scratch go into fullscreen
- "filename" makes scratch open the file (if it's an .sb file)
Of course, if you're attaching the Scratch EXE along with the batch file, you can modify Scratch to accept more command-line arguments.
To do this, open Scratch's IDE using the Shift-Click-R method and navigating using the browser to:
Scratch-UI-Panes -> ScratchFrameMorph -> startup -> startup
There you will find (about half way down) the code that uses the command line args.
Hope it helped!
Offline
I'm not quite sure how the syntax goes. When I try to open it in cmd.exe, it doesn't work.
I type in
C:\Program Files\Scratch>scratch -presentation
and what happens is a normal scratch window opens with the default scratch cat.
Say I have "project.sb" saved in the same directory as the Scratch installation (C:\Program Files\Scratch\). If I use the command prompt, how will I be able to open it up in presentation mode, and so on? What are the other things I can get it to do like this?
Offline
dnatrixene135 wrote:
I'm not quite sure how the syntax goes. When I try to open it in cmd.exe, it doesn't work.
I type inCode:
C:\Program Files\Scratch>scratch -presentationand what happens is a normal scratch window opens with the default scratch cat.
Say I have "project.sb" saved in the same directory as the Scratch installation (C:\Program Files\Scratch\). If I use the command prompt, how will I be able to open it up in presentation mode, and so on? What are the other things I can get it to do like this?
With Scratch you do not type "-presentation", you actually type "presentation" without the quotes and the dash.
Offline
@echo off
start C:\Program Files\Scratch.exe
Last edited by annoyingorange64 (2012-07-29 18:26:18)
Offline