Now lastly we need to make a button that closes the window instead of having to press reset. A window is made again but this time we have a button.
Now in the commander type : Box Then press enter. The brackets around the square tells MSW Logo to run the procedure square when the button is clicked on. Square is the display name of the button. Mybutton is the name used for other things. Mywindow is the name of the window the button is going to be in. Type: buttoncreate "mywindow "mybutton "Square 10 20 30 10 square Please put brackets around square. First click the Reset button in the commander window to delete the box. Now click edall and press enter after (windowcreate "main "mywindow "Autodraw 0 0 50 50 ) Now lets make some buttons you can click on to do things. A simple window is created at the top left of the screen. Now type in the commander window : Box Then press enter. The 0 0 are the setxy coordinates of the box. Press enter after the word box Now type: windowcreate "main "mywindow "Autodraw 0 0 50 50 Autodraw is the display name of the box and mywindow is the name MSW Logo uses for other things.
Click File then Edit Name this new procedure Box. MSW Logo can make a window that has buttons that you can click to run procedures. I can't put square brackets because it will make a link to nowhere. If you want to make a triangle, type instead of Repeat 4 FD 50 RT 90 Repeat 4 FD 50 RT 120 Please add square brackets around FD 50 RT 90.
#Commands of msw logo how to#
Now that you know how to make a square it should be easy to make other shapes.
Now click File save and exit now go the commander window and type square again and press enter. The repeat will repeat the commands in the brackets four times. Let's make the procedure again but lets make it shorter to type now type: Repeat 4 FD 50 RT 90 Please put square brackets around FD 50 RT 90. Now click Edall in the commander window and go to the procedure square and delete the FD 50 and RT 90's. In the commander window type the procedure Square then execute and the turtle draws a 50 x 50 x 50 x 50 square. How do you make a square easy, type: FD 50 RT 90 four times Then click File save and exit. Click after the word Square and press enter. Click File then edit in the main window then type in the name of the new procedure. Let's make a procedure that draws a square on the screen. You can run a procedure by typing in the commander window it's name. When there are too many words recorded in the commander window, type : Cleartext or CT Now you should now the most basic commands.Ī procedure is the steps the turtle will take to draw or make something.
If you want to rotate the turtle left, type: LT 90 Next to draw backwards, type: Back or BK 50 The turtle moves back 50. When things get too messy on the screen, type : clearscreen or CS (abbreviated ) This will clear the screen and erase everything drawn this also returns the turtle to the up position. That was easy but lets make it shorter and faster, type: FD 50 This does the same thing as Forward 50 but is shorter to type Now that we know how to draw a straight line lets draw it to the right instead of up, type: RT 90 FD 50 This rotates the turtle 90 degrees to the right and makes the turtle go forward 50. In the commander window type in the box: Forward 50 Then click execute or press enter on you keyboard, do this after anything you type in the commander window. The thing that draws everything is know as the turtle.