none
Feedback for an old application I made

    General discussion

  • Hi,

    I made this a long time ago and I used Goto's then. If you see the following

    Anything to do with File editing

    Sub

    Text.ConvertToLowerCase 

    Timer.Interval

    Timer.Tick

    Shapes.AddText

    Is me

    Everything else like WriteLine and If, ElseIf, Else, Are the old me

    CODE:

    GraphicsWindow.Hide()
    GraphicsWindow.CanResize = "false"
    GraphicsWindow.Width = "800"
    GraphicsWindow.Height = "500"
    Start()
    Sub ntext1
      TextWindow.Clear()
      TextWindow.WriteLine("Input Not Recognized")
      TextWindow.WriteLine("Try Again")
      TextWindow.WriteLine(" ")
      TextWindow.WriteLine("Type (Again) to Try Again")
      TextWindow.WriteLine("Type (End) to End Program")
      TextWindow.WriteLine(" ")
      user1 = TextWindow.Read()
      If user1 = "Again" Or user1 = "again" Then
        TextWindow.Clear()
        Start()
      ElseIf user1 = "End" or user1 = "end" Then
        Program.End()
      Else
        ntext1()
      EndIf
    EndSub
    Sub speedi 
      TextWindow.Clear()
      TextWindow.WriteLine("Speed can not be smaller than 1")
      TextWindow.WriteLine(" ")
      TextWindow.WriteLine("Type (Reset) to Try Again")
      TextWindow.WriteLine("Type (End) to End Program")
      TextWindow.WriteLine(" ")
      speediu = TextWindow.Read()
      If Text.ConvertToLowerCase(speediu) = "reset" Then
        Start()
      Elseif Text.ConvertToLowerCase(speediu) = "end" Then
        Program.End()
      Else
        ntext1()
      EndIf
    EndSub
    Sub speedib 
      TextWindow.Clear()
      TextWindow.WriteLine("Speed can not be bigger than 10")
      TextWindow.WriteLine(" ")
      TextWindow.WriteLine("Type (Reset) to Try Again")
      TextWindow.WriteLine("Type (End) to End Program")
      TextWindow.WriteLine(" ")
      speediub = TextWindow.Read()
      If Text.ConvertToLowerCase(speediub) = "reset" Then
        Start()
      Elseif Text.ConvertToLowerCase(speediub) = "end" Then
        Program.End()
      Else
        ntext1()
      EndIf
    EndSub
    Sub Start
      TextWindow.Show()
      TextWindow.Clear()
      TextWindow.WriteLine("Speed The Mitsubishi Is Created (1 - 10)")
      speed = TextWindow.ReadNumber()  
      If speed < 1 Then
        speedi()
      ElseIf speed > 10 Then
        speedib()
      EndIf    
      TextWindow.WriteLine(" ")
      
      TextWindow.WriteLine("Background Colour")
      bgcolor = TextWindow.Read()  
      TextWindow.WriteLine(" ")
      
      TextWindow.WriteLine("Color Of Mitsubishi Logo")
      color = TextWindow.Read()
      
      TextWindow.Hide()
      GraphicsWindow.Clear()
      GraphicsWindow.Show()
      
      GraphicsWindow.BackgroundColor =(bgcolor)
      GraphicsWindow.PenColor =(color)
      Turtle.Speed =(speed)
      
      Turtle.Show()
      Turtle.Hide()
      
      Turtle.Turn(30)
      Turtle.Move(50)
      
      Turtle.Turn(60)
      Turtle.Move(100)
      
      Turtle.Turn(60)
      Turtle.Move(50)
      
      Turtle.Turn(120)
      Turtle.Move(50)
      
      Turtle.Turn(60)
      Turtle.Move(100)
      
      Turtle.Turn(60)
      Turtle.Move(50)
      
      Turtle.Turn(120)
      Turtle.Move(50)
      
      Turtle.Turn(60)
      Turtle.Move(100)
      
      Turtle.Turn(60)
      Turtle.Move(50)
      
      Turtle.Turn(90)
      
      GraphicsWindow.FontSize = "64"
      If Text.ConvertToLowerCase(bgcolor) = "black" or Text.ConvertToLowerCase(bgcolor) = "gray" or Text.ConvertToLowerCase(bgcolor) = "darkgray" or Text.ConvertToLowerCase(bgcolor) = "dark gray" or Text.ConvertToLowerCase(bgcolor) = "" Then
        GraphicsWindow.BrushColor = "white"
      Else 
        GraphicsWindow.BrushColor = "black"
      Endif 
      count=Shapes.AddText("")  
      Shapes.Move (count,100, 100)
      Shapes.SetText(count,"5")
      Timer.Resume()
      Timer.Interval = "1000"
      Timer.Tick = t1 
    EndSub
    Sub t1
      Shapes.SetText(count,"4")
      Timer.Tick = t2
    EndSub 
    Sub t2
      Shapes.SetText(count,"3")
      Timer.Tick = t3
    EndSub 
    Sub t3
      Shapes.SetText(count,"2")
      Timer.Tick = t4
    EndSub 
    Sub t4
      Shapes.SetText(count,"1")
      Timer.Tick = t5
    EndSub
    Sub t5
      TextWindow.Clear()
      Timer.Pause()
      TextWindow.Show()
      GraphicsWindow.Hide()
      TextWindow.Clear()
      TextWindow.WriteLine("Completed!")
      con1()
    EndSub
    Sub con1
      TextWindow.WriteLine("Did you like it? (Yes, Y or No, N)")
      TextWindow.WriteLine("If you'd like to see the finished product type (show)")
      TextWindow.WriteLine(" ")
      Userans1 = TextWindow.Read()
      If Userans1 = "Yes" Or Userans1 = "Y" Or Userans1 = "yes" Or Userans1 = "y" Then
        TextWindow.Clear()
        TextWindow.WriteLine("Awesome!")
        TextWindow.WriteLine(" ")
        TextWindow.WriteLine("Type (Reset) to Reset Program")
        TextWindow.WriteLine("Type (End) to End Program")
        TextWindow.WriteLine(" ")
        Userans2 = TextWindow.Read()
        If Userans2 = "Reset" Or Userans2 = "reset" Then
          Start()
        ElseIf Userans2 = "End" or Userans2 = "end" Then
          Program.End()
        Else
          ntext1()
        EndIf
      ElseIf Userans1 = "No" or Userans1 = "N" or Userans1 = "no" or Userans1 = "n" Then
        TextWindow.Clear()
        again1()
      ElseIf Userans1 = "Show" or Userans1 = "show" Then
        TextWindow.Clear()
        TextWindow.WriteLine("The Window Will Open Forever")
        TextWindow.WriteLine(" ")
        TextWindow.WriteLine("Drag the Graphics Window and type ANYTHING to hide it")
        TextWindow.WriteLine("Wait a few seconds for the window to show")
        Program.Delay(8000)
        GraphicsWindow.Show()
        userinput = TextWindow.Read()
        If userinput = "Hide" or userinput = "hide" Then
          TextWindow.Clear()
          GraphicsWindow.Hide()
          con1()
        Else
          TextWindow.Clear()
          GraphicsWindow.Hide()
          con1()
        EndIf
      Else 
        ntext1()
      EndIf
    EndSub  
    Sub again1
      TextWindow.WriteLine("Oh, how could I improve?")
      text_path = Program.Directory + "\text input\"
      text_file = text_path + "text.txt"
      TextWindow.WriteLine(" ")
      userinfo = TextWindow.Read()
      File.WriteLine(text_file, 1, "Your Text Input")
      File.WriteLine(text_file, 2, userinfo)
      TextWindow.Clear()
      TextWindow.WriteLine("Did you type")
      TextWindow.WriteLine(" ")
      TextWindow.WriteLine(File.ReadLine(text_file,2))
      TextWindow.WriteLine(" ")
      TextWindow.WriteLine("(Type (Y) for Yes or (N) for No)")
      TextWindow.WriteLine(" ")
      userinfoyn = TextWindow.Read()
      If userinfoyn = "Y" or userinfoyn = "y" Then
        TextWindow.Clear()
        TextWindow.WriteLine("Awesome!")
        TextWindow.WriteLine("Just email it to (forbiddenducky@gmail.com)")
        TextWindow.WriteLine(" ")
        TextWindow.WriteLine("To Reset Program type (Reset)")
        TextWindow.WriteLine("To End Program type (End)")
        TextWindow.WriteLine(" ")
        userendin = TextWindow.Read()
        If userendin = "Reset" or userendin = "reset" Then
          TextWindow.Clear()
          Start()
        ElseIf userendin = "End" or userendin = "end" Then
          Program.End()
        Else 
          ntext1()
        EndIf
      ElseIf userinfoyn = "N" or userinfoyn = "n" Then
        TextWindow.Clear()
        TextWindow.WriteLine("Try Again")
        TextWindow.WriteLine(" ")
        again1()
      EndIf
    EndSub


    I love coding. This is signature is 100% Original. :)


    Monday, February 13, 2017 7:21 AM