Startup Code Examples
The Logo configuration page at https://weblogo.terrapinlogo.com/config lets you enter a set of Logo commands that Logo runs after the user has logged in. This feature makes Logo widely customizable. This page shows a number of examples you might use to customize Logo.
Create a set of procedures
This is a good place to create a set of procedures that every student can work with.
Hint: You can create a procedure MAIN
that contains all of your
desired settings. If Logo finds a procedure named MAIN
, it runs this
procedure automatically after loading all of the startup code.
Have turtles display their pen color
PPROP "PREFS "COLORED.TURTLES TRUE
Remove the prompt
MAKE "PROMPT "||
Turn AUTOSAVE on
PPROP "PREFS "AUTOSAVE "ALL
Relaxed Syntax
PPROP "PREFS "RELAXED.SYNTAX TRUE
Turn on Relaxed Syntax so students do not have to enter the colon character in front of variable names. There are several more settings available; see this documentation page for more info.
Switch to a predefined layout
Logo knows four predefined panel layouts:
BASIC
displays only the Graphics and Listener panels, with the Listener panel at the bottom.VERTICAL
displays only the Graphics and Listener panels, with the Listener panel at the right.STANDARD
displays the Graphics, Listener, Editor, and Help panels.BLOCKS
sets the Logo Blocks layout with the Blocks, Editor, Graphics, and Listener panels.
Use this command to set a desired layout:
MAKE "LAYOUT layoutname
Save a specific window layout
- Drag and resize the Logo panels to your liking.
- Type
:LAYOUT
and copy the resulting list. - Then, type
MAKE "LAYOUT
and paste that list to set the layout with the desired values.
Set the startup folder
This setting is very convenient for the desktop version, which has access to local disk storage. Define the current folder for load and save operations. You can use the following special patterns as part of a file or folder name, which Logo substitues with the student’s login info.
{USERNAME}
the student’s login name{HOME}
the home folder (desktop version){DOCUMENTS}
the Documents folder (desktop version){DOWNLOADS}
the Downloads folder (desktop version){CLASSROOM}
the student’s classroom if defined in the student CSV file
Example: Set the startup folder to a student folder. If the student
logged in as “John”, for example, the following command would set the folder to
H:\STUDENTS\John
in a Windows environment. Note the ~PC
at the
beginning of the path name, which instructs Logo to use a local disk.
You also need to use vertical bars around the path name, because using
curly brackets makes Logo think that you want to create a Logo array.
SETCURDIR "|~PC/H/STUDENTS/{USERNAME}|