Microsoft Small Basic

Program Listing:
Embed this in your website
GraphicsWindow.Height = 500
GraphicsWindow.Width = 1000
buttonclicked = 0
inputdone = 0
m = 200
n = 0
doingreset = 0
firstinput = 1

'Start Page'
GraphicsWindow.BrushColor = "black"
textbox2 = Controls.AddTextBox(265, 50)
GraphicsWindow.DrawBoundText(300, 20, 100, "Pen Colour:")
textbox = Controls.AddTextBox(465, 50)
GraphicsWindow.DrawBoundText(500, 20, 100, "Enter String:")
textbox3 = Controls.AddTextBox(665, 50)
GraphicsWindow.DrawBoundText(680, 20, 150, "Background Colour:")
button = Controls.AddButton("Submit", 510, 75)

GraphicsWindow.BrushColor = "black"
GraphicsWindow.DrawRectangle(10, 10, 35, 21)
GraphicsWindow.DrawRectangle(940, 10, 50, 21)
GraphicsWindow.DrawBoundText(12, 12, 46, "Help")
GraphicsWindow.DrawBoundText(942, 12, 50, "Colours")
GraphicsWindow.KeyDown = Key
GraphicsWindow.MouseDown = Help
Controls.ButtonClicked = Click
Sub Click
  If Controls.LastClickedButton = button Then
    If firstinput = 1 then
      colour = Controls.GetTextBoxText(textbox2)
      Text.ConvertToLowerCase(colour)
      bgcolour = Controls.GetTextBoxText(textbox3)
      Text.ConvertToLowerCase(bgcolour)
    EndIf
      input = Controls.GetTextBoxText(textbox)
      buttonclicked = 1
  EndIf
EndSub
buttonloop:
If buttonclicked = 0 Then
  If firstinput = 0 then
    GraphicsWindow.BrushColor = bgcolour
    GraphicsWindow.PenColor = bgcolour
    GraphicsWindow.FillRectangle(290, 10, 120, 30)
    GraphicsWindow.FillRectangle(670, 10, 130, 30)
  Endif
  Goto buttonloop
Else
  buttonclicked = 0
EndIf
'End Start Page'

'Drawing'
Turtle.Speed = 10
Default()
If colour = "random" then
  GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()
Else
  GraphicsWindow.PenColor = colour
Endif

If bgcolour = "random" then
  GraphicsWindow.BackgroundColor = GraphicsWindow.GetRandomColor()
Elseif bgcolour = "" then
  GraphicsWindow.BackgroundColor = "white"
  bgcolour = "white"
Else
  GraphicsWindow.BackgroundColor = bgcolour
Endif

For k = 1 To Text.GetLength(input)
  letter[k] = Text.GetSubText(input, k, 1)
  letter[k] = Text.ConvertToUpperCase(letter[k])
  'Letters'
  n = n + 1
  If letter[k] = "A" Then
    Turtle.Turn(20)
    Turtle.Move(43)
    Turtle.Turn(140)
    Turtle.Move(43)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(-70)
    Turtle.Move(15)
    Default()
  ElseIf letter[k] = "B" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "C" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.PenDown()
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(15)
    Default()

  ElseIf letter[k] = "D" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "E" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(25)
    Turtle.Turn(180)
    Turtle.Move(25)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(25)
    Default()

  ElseIf letter[k] = "F" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(25)
    Turtle.Turn(180)
    Turtle.Move(25)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Default()

  ElseIf letter[k] = "G" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(25)
    Turtle.Turn(180)
    Turtle.Move(25)
    Turtle.Turn(-90)
    Turtle.Move(40)
    Turtle.Turn(-90)
    Turtle.Move(25)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "H" Then
    Turtle.Move(40)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(40)
    Default()

  ElseIf letter[k] = "I" Then
    Turtle.Turn(90)
    Turtle.Move(26)
    Turtle.Turn(180)
    Turtle.Move(13)
    Turtle.Turn(90)
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(13)
    Turtle.Turn(180)
    Turtle.Move(26)
    Default()

  ElseIf letter[k] = "J" Then
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(-90)
    Turtle.Move(20)
    Turtle.Turn(-90)
    Turtle.Move(40)
    Default()

  ElseIf letter[k] = "K" Then
    Turtle.Move(40)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(-140)
    Turtle.Move(23)
    Turtle.Turn(180)
    Turtle.Move(23)
    Turtle.Angle = 140
    Turtle.Move(25)
    Default()

  ElseIf letter[k] = "L" Then
    Turtle.Move(40)
    Turtle.Turn(180)
    Turtle.Move(40)
    Turtle.Turn(-90)
    Turtle.Move(25)
    Default()

  ElseIf letter[k] = "M" Then
    Turtle.Move(40)
    Turtle.Turn(150)
    Turtle.Move(20)
    Turtle.Turn(-120)
    Turtle.Move(20)
    Turtle.Angle = 180
    Turtle.Move(40)
    Default()

  ElseIf letter[k] = "N" Then
    Turtle.Move(40)
    Turtle.Turn(150)
    Turtle.Move(46)
    Turtle.Angle = 0
    Turtle.Move(40)
    Default()

  ElseIf letter[k] = "O" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.PenDown()
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Default()

  ElseIf letter[k] = "P" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(25)
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(90)
    Turtle.Move(25)
    Default()

  ElseIf letter[k] = "Q" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.PenDown()
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(180)
    Turtle.Move(7.5)
    Turtle.Turn(90)
    Turtle.Move(5)
    Turtle.Turn(180)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "R" Then
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(225)
    Turtle.Move(28)
    Default()

  ElseIf letter[k] = "S" Then
    Turtle.PenUp()
    Turtle.Move(10)
    Turtle.PenDown()
    Turtle.Turn(135)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "T" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(-90)
    Turtle.PenDown()
    Turtle.Move(40)
    Turtle.Turn(-90)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Default()

  ElseIf letter[k] = "U" Then
    Turtle.PenUp()
    Turtle.Move(40)
    Turtle.Turn(180)
    Turtle.PenDown()
    Turtle.Move(30)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(30)
    Default()

  ElseIf letter[k] = "V" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Angle = -20
    Turtle.PenDown()
    Turtle.Move(43)
    Turtle.Turn(180)
    Turtle.Move(43)
    Turtle.Angle = 20
    Turtle.Move(43)
    Default()

  ElseIf letter[k] = "W" Then
    Turtle.PenUp()
    Turtle.Move(40)
    Turtle.PenDown()
    Turtle.Angle = 170
    Turtle.Move(43)
    Turtle.Angle = 10
    Turtle.Move(43)
    Turtle.Angle = 170
    Turtle.Move(43)
    Turtle.Angle = 10
    Turtle.Move(43)
    Default()

  ElseIf letter[k] = "X" Then
    Turtle.Angle = 30
    Turtle.Move(44)
    Turtle.Turn(180)
    Turtle.Move(22)
    Turtle.Angle = -30
    Turtle.Move(22)
    Turtle.Turn(180)
    Turtle.Move(44)
    Default()

  ElseIf letter[k] = "Y" Then
    Turtle.PenUp()
    Turtle.Move(40)
    Turtle.PenDown()
    Turtle.Angle = 150
    Turtle.Move(22)
    Turtle.Angle = 30
    Turtle.Move(22)
    Turtle.Turn(180)
    Turtle.Move(22)
    Turtle.Angle = 180
    Turtle.Move(20)
    Default()

  ElseIf letter[k] = "Z" Then
    Turtle.PenUp()
    Turtle.Move(40)
    Turtle.Turn(90)
    Turtle.PenDown()
    Turtle.Move(20)
    Turtle.Angle = 210
    Turtle.Move(45)
    Turtle.Angle = 90
    Turtle.Move(20)
    Default()

  ElseIf letter[k] = " " Then
    Default()

  ElseIf letter[k] = "1" Then
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(40)
    Turtle.Turn(225)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "2" Then
    Turtle.PenUp()
    Turtle.Move(35)
    Turtle.PenDown()
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(35)
    Turtle.Turn(-135)
    Turtle.Move(25)
    Default()

  ElseIf letter[k] = "3" Then
    Turtle.PenUp()
    Turtle.Move(35)
    Turtle.PenDown()
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(7.5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(7.5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "4" Then
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.Turn(-90)
    Turtle.PenDown()
    Turtle.Move(45)
    Turtle.Angle = 210
    Turtle.Move(30)
    Turtle.Angle = 90
    Turtle.Move(25)
    Default()

  Elseif letter[k] = "5" Then
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(15)
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(90)
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "6" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Turn(-90)
    Turtle.Move(45)
    Turtle.Turn(90)
    Turtle.PenDown()
    Turtle.Move(5)
    Turtle.Turn(180)
    Turtle.Move(15)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(30)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Default()

  Elseif letter[k] = 7 then
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Angle = 30
    Turtle.Move(50)
    Turtle.Angle = 270
    Turtle.Move(25)
    Default()

  Elseif letter[k] = 8 Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(7.5)
    Turtle.PenDown()
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Default()

  Elseif letter[k] = 9 Then
    Turtle.PenUp()
    Turtle.Move(27.5)
    Turtle.PenDown()
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Angle = 180
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Default()

  ElseIf letter[k] = "0" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.PenDown()
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    turtlex1 = Turtle.x
    turtley1 = Turtle.y
    Turtle.Turn(45)
    Turtle.Move(25)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(15)
    turtlex2 = Turtle.x
    turtley2 = Turtle.y
    Turtle.Turn(45)
    Turtle.Move(25)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.PenUp()
    Turtle.MoveTo(turtlex1, turtley1)
    Turtle.PenDown()
    Turtle.MoveTo(turtlex2, turtley2)
    Default()

  Elseif letter[k] = "." Then
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Default()

  Elseif letter[k] = "," Then
    Turtle.Angle = 195
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "?" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Angle = 0
    Turtle.PenDown()
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(10)
    Turtle.PenDown()
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(7.5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Default()

  Elseif letter[k] = "*" Then
    Turtle.PenUp()
    Turtle.Move(30)
    Turtle.Turn(90)
    Turtle.PenDown()
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "!" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Angle = 0
    Turtle.PenDown()
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(10)
    Turtle.PenDown()
    Turtle.Move(30)
    Default()

  Elseif letter[k] = "(" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(30)
    Turtle.PenDown()
    Turtle.Angle = 320
    Turtle.Turn(180)
    Turtle.Move(5)
    Turtle.Turn(180)
    Turtle.Move(15)
    Turtle.Angle = 0
    Turtle.Move(30)
    Turtle.Angle = 40
    Turtle.Move(15)
    Default()

  Elseif letter[k] = ")" Then
    Turtle.PenUp()
    Turtle.Turn(-90)
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Angle = 40
    Turtle.Turn(180)
    Turtle.Move(5)
    Turtle.Turn(180)
    Turtle.Move(15)
    Turtle.Angle = 0
    Turtle.Move(30)
    Turtle.Angle = 320
    Turtle.Move(15)
    Default()

  Elseif letter[k] = "&" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(7.5)
    Turtle.PenDown()
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(15)
    Turtle.Turn(180)
    Turtle.Move(6)
    Turtle.Turn(180)
    Turtle.Turn(-45)
    Turtle.PenUp()
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.PenDown()
    Turtle.Turn(45)
    Turtle.Turn(180)
    Turtle.Move(30)
    Turtle.Turn(180)
    Turtle.Move(30)
    turtlex3 = Turtle.x
    turtley3 = Turtle.y
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    turtlex4 = Turtle.X
    turtley4 = Turtle.y
    Turtle.PenUp()
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.PenDown()
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.Turn(-45)
    Turtle.Move(9)
    Turtle.PenUp()
    Turtle.MoveTo(turtlex3, turtley3)
    Turtle.PenDown()
    Turtle.MoveTo(turtlex4, turtley4)
    Default()

  Elseif letter[k] = "%" then
    turtlex5 = Turtle.x
    turtley5 = Turtle.y
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.PenUp()
    Turtle.MoveTo(turtlex5, turtley5)
    Turtle.PenDown()
    Turtle.Angle = 30
    Turtle.Move(45)
    Turtle.Angle = 270
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Default()

  Elseif letter[k] = "/" then
    Turtle.Angle = 30
    Turtle.Move(45)
    Default()

  Elseif letter[k] = "\" then
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(20)
    Turtle.PenDown()
    Turtle.Angle = 330
    Turtle.Move(45)
    Default()

  Elseif letter[k] = "$" Then
    turtlex6 = Turtle.X
    turtley6 = Turtle.y
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(12.5)
    Turtle.PenDown()
    Turtle.Turn(90)
    Turtle.Move(5)
    Turtle.Turn(180)
    Turtle.Move(55)
    turtle.PenUp()
    Turtle.MoveTo(turtlex6, turtley6-10)
    Turtle.Angle = 0
    Turtle.PenDown()
    Turtle.Turn(135)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(-45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "^" then
    Turtle.PenUp()
    Turtle.Move(35)
    Turtle.Turn(90)
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Angle = 60
    Turtle.Move(10)
    Turtle.Angle = 120
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "#" Then
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Turn(90)
    Turtle.Move(30)
    Turtle.Turn(180)
    Turtle.Move(30)
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Move(30)
    Turtle.Turn(180)
    Turtle.PenUp()
    Turtle.Move(35)
    Turtle.Angle = 180
    Turtle.Move(25)
    Turtle.Turn(-90)
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Angle = 15
    Turtle.Move(40)
    Turtle.PenUp()
    Turtle.Angle = 90
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Angle = 195
    Turtle.Move(40)
    Default()

  Elseif letter[k] = "@" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.PenDown()
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(45)
    Turtle.Move(20)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(2.5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(15)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Turtle.Turn(-45)
    Turtle.Move(7)
    Default()

  Elseif letter[k] = "-" Then
    Turtle.PenUp()
    Turtle.Move(20)
    Turtle.PenDown()
    Turtle.Turn(90)
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "_" Then
    Turtle.Turn(90)
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "+" Then
    Turtle.PenUp()
    Turtle.Move(20)
    Turtle.PenDown()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "=" Then
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Turn(90)
    Turtle.Move(20)
    Turtle.PenUp()
    Turtle.Turn(-90)
    Turtle.Move(10)
    Turtle.Turn(-90)
    Turtle.PenDown()
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "|" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Turn(-90)
    Turtle.PenDown()
    Turtle.Move(20)
    Turtle.PenUp()
    Turtle.Move(5)
    Turtle.PenDown()
    Turtle.Move(20)
    Default()

  Elseif letter[k] = "[" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(30)
    Turtle.PenDown()
    Turtle.Angle = -90
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(45)
    Turtle.Turn(90)
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "]" Then
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(-90)
    Turtle.Move(45)
    Turtle.Turn(-90)
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "{" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(30)
    Turtle.PenDown()
    Turtle.Angle = -90
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(5)
    Turtle.Move(10)
    Turtle.Angle = 315
    Turtle.Move(5)
    Turtle.Angle = 45
    Turtle.Move(5)
    Turtle.Angle = 355
    Turtle.Move(10)
    Turtle.Angle = 0
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Default()

  Elseif letter[k] = "}" Then
    Turtle.Angle = 90
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-5)
    Turtle.Move(10)
    Turtle.Angle = 45
    Turtle.Move(5)
    Turtle.Angle = 315
    Turtle.Move(5)
    Turtle.Angle = 5
    Turtle.Move(10)
    Turtle.Angle = 5
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Default()

  Elseif letter[k] = ":" Then
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(25)
    Turtle.PenDown()
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Default()

  Elseif letter[k] = ";" Then
    Turtle.Angle = 195
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Angle = 0
    Turtle.PenUp()
    Turtle.Move(25)
    Turtle.PenDown()
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Turtle.Turn(90)
    Turtle.Move(2)
    Default()

  Elseif letter[k] = "'" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Turn(-90)
    Turtle.Move(35)
    Turtle.PenDown()
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "<" Then
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.Turn(90)
    Turtle.Move(30)
    Turtle.PenDown()
    Turtle.Angle = 315
    Turtle.Move(10)
    Turtle.Angle = 45
    Turtle.Move(10)
    Default()

  Elseif letter[k] = ">" Then
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Angle = 45
    Turtle.Move(10)
    Turtle.Angle = 315
    Turtle.Move(10)
    Default()

  Elseif letter[k] = "~" Then
    Turtle.PenUp()
    Turtle.Move(15)
    Turtle.PenDown()
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(45)
    Turtle.Move(5)
    Turtle.Turn(35)
    Turtle.Move(10)
    Turtle.Turn(-15)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Turtle.Turn(-45)
    Turtle.Move(5)
    Default()

  Elseif letter[k] = "`" Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Turn(-90)
    Turtle.Move(35)
    Turtle.PenDown()
    Turtle.Angle = 320
    Turtle.Move(10)
    Default()

  Elseif letter[k] = Text.GetCharacter(34) Then
    Turtle.PenUp()
    Turtle.Turn(90)
    Turtle.Move(15)
    Turtle.Turn(-90)
    Turtle.Move(35)
    Turtle.PenDown()
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.PenUp()
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.PenDown()
    Turtle.Move(10)
    Default()

  Else
    Turtle.PenUp()
    Turtle.Move(30)
    Turtle.Turn(90)
    Turtle.PenDown()
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(45)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Turtle.Turn(180)
    Turtle.Move(10)
    Turtle.Turn(90)
    Turtle.Move(10)
    Turtle.Turn(180)
    Turtle.Move(20)
    Default()
  EndIf
'End Letters'
EndFor
'End Drawing'

'Reset'
Turtle.PenUp()
Turtle.MoveTo(901, 1)
doingreset = 1
Default()
Controls.Remove(textbox2)
Controls.Remove(textbox3)
firstinput = 0
Goto buttonloop
'End Reset'

'Default'
Sub Default
  If Turtle.X > 900 Then
    Turtle.PenUp()
    Turtle.MoveTo(40*n + 25, m)
    Turtle.Angle = 0
    Turtle.Move(20)
    If doingreset = 0 then
      Turtle.PenDown()
    ElseIf doingreset = 1 then
      doingreset = 0
    EndIf
    Turtle.Turn(90)
    Turtle.Move(20)
    m = m + 50
    n = 0
  EndIf
  Turtle.PenUp()
  Turtle.MoveTo(40*n + 25, m)
  Turtle.Angle = 0
  Turtle.PenDown()
EndSub
'End Default'

'Help'
Sub Help
  If GraphicsWindow.MouseX > 10 And GraphicsWindow.MouseX < 45 And GraphicsWindow.MouseY > 10 And GraphicsWindow.MouseY < 31 Then
    GraphicsWindow.ShowMessage("Enter a pen colour, background colour, and some words. Click 'submit' and watch the turtle write it. unknown characters will bedrawn as an asterisk", "Help")
  ElseIf GraphicsWindow.MouseX > 940 And GraphicsWindow.MouseX < 990 And GraphicsWindow.MouseY > 10 and GraphicsWindow.MouseY < 31 Then
    GraphicsWindow.ShowMessage("The accepted colours are: LightCoral, Salmon, DarkSalmon, LightSalmon, Crimson, Red, FireBrick, DarkRed, Pink, LightPink, HotPink, DeepPink, MediumVioletRed, PaleVioletRed, LightSalmon, Coral, Tomato, OrangeRed, DarkOrange, Orange, Gold, Yellow, LightYellow, LemonChiffon, LightGoldenrodYellow, PapayaWhip, Moccasin, PeachPuff, PaleGoldenrod, Khaki, DarkKhaki, Lavender, Thistle, Plum, Violet, Orchid, Fuchsia, Magenta, MediumOrchid, MeduimPurple, BlueViolet, DarkViolet, DarkOrchid, DarkMagenta, Purple, Indigo, SlateBlue, DarkSlateBlue, MediumSlateBlue, SpringGreen, MediumSpringGreen, SeaGreen, MediumSeaGreen, Green, ForestGreen, DarkGreen, YellowGreen, OliveDrab, Olive, DarkOliveGreen, MediumAquaMarine, DarkSeaGreen, LightSeaGreen, DarkCyan, Teal, Aqua, Cyan, LightCyan, PaleTurquoise, Aquamarine, Turquoise, MediumTurquoise, DarkTurquoise, CadetBlue, SteelBlue, LightSteelBlue, PowderBlue, LightBlue, SkyBlue, LightSkyBlue, DeepSkyBlue, DodgerBlue, CornflowerBlue, MediumSlateBlue, RoyalBlue, Blue, MediumBlue, DarkBlue, Navy, MidnightBlue, White, Snow, Honeydew, MintCream, Azure, AliceBlue, GhostWhite, WhiteSmoke, Seashell, Beige, OldLace, FloralWhite, Ivory, AntiqueWhite, Linen, LavenderBlush, MistyRose, CornSilk, BlanchedAlmond, Bisque, NavjoWhite, Wheat, BurlyWood, Tan, RosyBrown, SandyBrown, Goldenrod, DarkGoldenrod, Peru, Chocolate, SaddleBrown, Sienna, Brown, Maroon, Gainsboro, LightGray, Silver, Darkgray, Gray, DimGray, LightSlateGray, SlateGray, DarkSlateGray, Black", "Colour List")
  EndIf
EndSub
'End Help'

Sub Key
  If GraphicsWindow.LastKey = "Return" Then
    If firstinput = 1 then
      colour = Controls.GetTextBoxText(textbox2)
      Text.ConvertToLowerCase(colour)
      bgcolour = Controls.GetTextBoxText(textbox3)
      Text.ConvertToLowerCase(bgcolour)
    EndIf
      input = Controls.GetTextBoxText(textbox)
      buttonclicked = 1
  EndIf
EndSub
Copyright (c) Microsoft Corporation. All rights reserved.