3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to program using MSW Logo

Step 5Step 5 Making a window

Step 5 Making a window
«
  • Edit2.JPG
  • wind.JPG
  • re.JPG
  • edit3.JPG
  • box.JPG
  • box2.JPG
  • box3.JPG
MSW Logo can make a window that has buttons that you can click to run procedures.

Let's start by making a new procedure.

Click File then Edit

Name this new procedure 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.



The 0 0 are the setxy coordinates of the box.

The 50 50 is the size of the box.

Now click File save and exit.

Now type in the commander window :

Box

Then press enter.

A simple window is created at the top left of the screen.

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.

First click the Reset button in the commander window to delete the box.

Type:

buttoncreate "mywindow "mybutton "Square 10 20 30 10 square

Please put brackets around square.

Mywindow is the name of the window the button is going to be in.

Mybutton is the name used for other things.

Square is the display name of the button.

The 10 20 is the setxy coordinates.

The 30 10 is the size of the button.

The brackets around the square tells MSW Logo to run the procedure square
when the button is clicked on.

Now in the commander type :

Box

Then press enter.

A window is made again but this time we have a button.

Now lastly we need to make a button that closes the window instead of having to press reset.

Go back to the procedure box then press enter after the buttoncreate line.

Type:

buttoncreate "mywindow "mybutton2 "Close 10 10 25 10 windowdelete "mywindow

Please put square brackets around windowdelete "mywindow.

The windowdelete deletes a window but first you type "mywindow to tell it which one to delete.

Now go to the commander window and type the procedure box once more and press enter.

Now we have a window with a button that draw a square and a button that closes the window.

Congratulations you now know how to do many things in MSW Logo and should be able to make almost anything now.

Like I said before I can't put square brackets because a link to nowhere is made.

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:Finnly