Thank you as always to Al Sweigart, from whose book "Scratch Programming Playground" I took this idea