New instruction - strict

A new instruction "strict: no" allows Hat blocks to be placed anywhere in a script.
Published: November 27, 2023
New instruction - strict

Consider the following as an assessment question "Give the order in which the following blocks should be arranged to cause a Balloon sprite to rise from the bottom of the Stage to the top". When listing the blocks it would be nice to list them in any order however there is a problem. Currently the Editor will only allow Hat blocks to be place at the top of a stack. To allow for this situation we created a new instruction "strict" which when set to "no" will allow blocks to be placed in any order.

If you enter the following script into the editor it will generate an error on line 9 "Hat blocks have to be the first block in a script ..."

go to x (0) y (-180) ~ Block 1
separator
move (10) steps ~ Block 2
separator
point in direction (0) ~ Block 3
separator
repeat until <(y position) gt (175)> ~ Block 4
space
when flag clicked ~ Block 5

To get around that error you can provide the instruction "-- strict: no", the Editor will then allow Hat blocks to be place anywhere within a script. The updated script should be:

-- strict: no
go to x (0) y (-180) ~ Block 1
separator
move (10) steps ~ Block 2
separator
point in direction (0) ~ Block 3
separator
repeat until <(y position) gt (175)> ~ Block 4
space
when flag clicked ~ Block 5

Additionally, "-- strict: no" will also allow the "myblock" directive to the used without a corresponding "define". Again, this is useful if you are designing assessment questions that require a custom block but don't require the definition of the block to be provided. 

Give the new strict instruction a try and see what you can create.


New highlight method

The old way of highlighting blocks in Black & White color output mode just didn't cut it, so we changed it.
Published: November 22, 2023
New highlight method

We have changed the way that blocks are displayed when marked with the "highlight" directive for the Black & White color option in an attempt to make the highlighted blocks stand out more.

Now when blocks are highlighted and the color option is Black & White, the outline of the highlighted blocked will be darkened and all other blocks, which have not been highlighted, will be dimmed, visually drawing attention to the highlighted blocks. See the example script below.

when flag clicked
pen down
go to x (-100) y (100)
highlight!repeat (4)
    move (200) steps
    turn right (90) degrees
pen up

Remember that the "highlight" directive can also be placed on the interior of a command to highlight different parts of it. For example try these command to see how different blocks are highlighted:

if <highlight!<key [right arrow] pressed> and <(x position) lt (190)>> then
if <<highlight!key [right arrow] pressed> and <(x position) lt (190)>> then
if <<key [highlight!right arrow] pressed> and <(x position) lt (190)>> then

Try out the new highlight for Black & White blocks and let us know what you think.


Changes to Options menu

The Options menu has been expanded and rearranged.
Published: November 20, 2023
Changes to Options menu

With the introduction of the autocomplete feature in the Editor, we have rearranged the Options and separated them into Images and Editor sections. The Images section contains all the previously existing options, the Editor section contains brand new options.

The Editor section of the Options contains the following:

  • Autocomplete - allowing you to turn off the autocomplete functionality

  • Show autocompletions for extensions requiring a device - to reduce the number of options shown for autocompletion, by default, we do not include the blocks for extensions which require an external devices: Makey Makey, Micro:bit, EV3, Boost, WeDo and Force & Acceleration. You can turn on this option to include those blocks in the autocompletion options.

  • Editor text size - you can now choose between 'Smaller', 'Normal', 'Large' and 'Larger' options for the text size used in the editor. The default is 'Normal'.

  • Indent Unit (in spaces) - you can now customized the number of spaces used to indent the code ranging from 1 to 4. 2 is the default.

To save your options simple select "Save as defaults" at the top of the Options when creating an image.

NOTE: Due to space limitations in Google Docs & Slides add-on the new Editor options will not be available in the Google Docs & Slides add-on.


Editor enhancements

We've added autocompletions to the Editor.
Published: November 20, 2023
Editor enhancements

In an attempt to simplify script entry when typing scripts into the Editor we have introduced autocompletion. Type the first few characters of a block and a list of matching blocks will appear. The blocks will be sorted from most frequently to least frequently used so the most common blocks will be listed first.

Simply press Tab to accept an option. If the block selected requires fields to be completed the cursor will advance to the first empty field. You can use the key sequence "Ctrl-m" on Windows machines, or "Cmd-m" on Macs, to move to the next empty field.

The Editor now also support auto-indent and auto-outdent. The editor will automatically indent the next line when a C-block is entered and will automatically outdent when the cap blocks "delete this clone" and "stop [all]" are entered. The Editor will also automatically outdent "else" blocks.

Our benchmark tests show that these enhancements speed up the entering of scripts by up to 70%.

We've added new options to the Editor section of the Options that allow you to control whether autocompletion if enabled or not; whether to include blocks for the extensions that require a device for example Makey Makey and Microbit; to control the size of the text in the editor and to control the number of spaces used to indent a line.

All in all, we think we have accomplished our original goal of simplifying script entry. As usual any feedback is welcomed.


New language - Finnish

The newest language on the block - Finnish!
Published: November 2, 2023
New language - Finnish

We have added support for Finnish. Starting in 2016 the Finnish school curriculum introduced coding as key content for all subjects. We look forward to working with our Finnish partners to bring Print Scratch to as many Finnish educators as possible.

This brings the number of supported languages to 10, the other nine being - English, French, Spanish, Spanish (Latin American), German, Dutch, Italian, Portuguese and Portuguese (Brazilian). 

Due to loads of requests, the next language we will be adding support for is Arabic. However, it will require significant changes as it is will be the first RTL (Right-To-Left) language we'll be supporting. We anticipate completion in the first quarter of 2024. If you're willing to assist with the translation of the Examples page into Arabic please get in touch.