The Scripts Area is the area on the right side of the project editor where scripts are assembled. It can be accessed from both the Stage and from sprites, although the Stage and each sprite all have separate scripts areas and scripts. It is a gray pinstriped rectangle, whose size can be changed by clicking the buttons next to the button to toggle.
- Main article: Context Menu
The Scripts Area menu consists of three options when right-clicked. It can also be brought up by holding down the left mouse, as a feature for one button mouses. The options are:
- Clean Up: This feature allows a user to organize oddly placed scripts on the scripts area. Scratch will order them vertically on the left side of the Scripts Area, with a slight space in between each.
- Add Comment: This was created as a replacement for the comment block in Scratch 1.2. It was removed because it confused users; it has no effect on a sprite's scripts. After much protesting of its removal on the Scratch Website, the current comment feature was introduced in Scratch 1.3. It allows for a user to type notes or helpful comments in a convenient area, usually explaining how their scripts work. The user can also attach it to scripts and adjust its width. Despite all of their help, comments greatly slow a project's speed - they are sometimes avoided or placed detached from their wanted places in their script.
When a user right clicks on a block in the editing area, they get the following options as well as "Add Comment":
- Add Comment: Creates a comment, which is attached to the block the user right clicked on.
- Duplicate: Duplicates the script and allows the user to place it either somewhere else within the sprite or on another sprite.
- Delete: Only shown on the top of a script; deletes the whole script.
- Help: Shows the help bar, with information about the block the user right clicked on.
These options are only available for custom blocks:
- Edit: Opens the custom block edit window.
- Define: This only appears on uses of the custom block. This will make the define block visible.
Some blocks have other options, these options change the block to a similar block, this applies to:
- +, -, *, /: This will change the block to another operation.
- =, <, >: This will change the block to another operation.
- All variables: A list of variables will show up, when one is clicked, the variable reporter will change to that variable.
- All lists: A list of lists will show up, when one is clicked, the list reporter will change to that list.
To code in Scratch, simply drag blocks out from the eight palettes and assemble them in the Scripts Area. If necessary, scroll bars will appear to extend the area downwards or to the right. You can also change values of blocks that are in the block palette, but changes back to default when the palette is redrawn.
Blocks can be removed by dragging the block(s) into the block palette. Another way to delete blocks is to right-click (control-click also works on Macs) and click "delete" in the drop-down menu that appears.
Switching to Scripts Area
There are two easy ways to switch to the scripts area:
- Click Scripts
- Drag a block over the costumes or sounds tab and it will switch to the scripts tab
Scratch 2.0 Scripts Area
In Scratch 2.0, the scripts area is styled differently, with light gray dots over a silver background, and is also on the opposite side of the screen. Users can access the content menu by shift-clicking or right-clicking. The menu has choices to zoom in or out of scripts, which can be helpful for finding a script or moving a script a long distance.
- Shift-clicking is a commonly known workaround for a bug with the context menu