Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextWindow.BackgroundColor = "Blue"
- TextWindow.ForegroundColor = "Green"
- TextWindow.WriteLine("Do not use caps lock on commands.")
- 'Beginning loop
- prompt:
- m = MessageBox.AskForInput("i2y prompt. Type help for help.")
- If m = "help" Then
- TextWindow.WriteLine("Type i2f for inches to feet.")
- TextWindow.WriteLine("Type f2i for feet to inches.")
- TextWindow.WriteLine("Type f2y for feet to yards.")
- TextWindow.WriteLine("Type y2f for yards to feet.")
- TextWindow.WriteLine("Type y2m for yards to miles.")
- TextWindow.WriteLine("Type f2m for feet to miles.")
- TextWindow.WriteLine("Type m2y for miles to yards.")
- TextWindow.WriteLine("Type m2f for miles to feet.")
- TextWindow.WriteLine("Type weight to go to the weight prompt.")
- TextWindow.WriteLine("Type capacity to go to the capacity prompt.")
- TextWindow.WriteLine("Type exit to quit the program.")
- Goto prompt
- EndIf
- 'Yards to miles
- If m = "y2m" Then
- a = MessageBox.AskForInput("Yards to miles")
- a = a / 1760
- TextWindow.Write(a)
- TextWindow.Write(" M.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Feet to miles
- If m = "f2m" Then
- a = MessageBox.AskForInput("Feet to miles")
- a = a / 5280
- TextWindow.Write(a)
- TextWindow.Write(" M.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Miles to yards
- If m = "m2y" Then
- a = MessageBox.AskForInput("Miles to yards")
- a = a * 1760
- TextWindow.Write(a)
- TextWindow.Write(" yd.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Miles to feet
- If m = "m2f" Then
- a = MessageBox.AskForInput("Miles to feet")
- a = a * 5280
- TextWindow.Write(a)
- TextWindow.Write(" ft.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Yards to feet
- If m = "y2f" Then
- a = MessageBox.AskForInput("Yards to feet")
- a = a * 3
- TextWindow.Write(a)
- TextWindow.Write(" ft.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Inches to feet
- If m = "i2f" Then
- a = MessageBox.AskForInput("Inches to feet")
- a = a / 12
- TextWindow.Write(a)
- TextWindow.Write(" ft.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Feet to yards
- If m = "f2y" Then
- a = MessageBox.AskForInput("Feet to yards")
- a = a / 3
- TextWindow.Write(a)
- TextWindow.Write(" yd.")
- TextWindow.WriteLine("")
- EndIf
- 'Feet to inches
- If m = "f2i" Then
- a = MessageBox.AskForInput("Feet to inches")
- a = a * 12
- TextWindow.Write(a)
- TextWindow.Write(" in.")
- TextWindow.WriteLine("")
- Goto prompt
- EndIf
- 'Use other units
- If m = "weight" Then
- Goto mass
- EndIf
- 'Use more units
- If m = "capacity" Then
- Goto capacity
- EndIf
- mass:
- b = MessageBox.AskForInput("i2y prompt type help for help.")
- If b = "length" Then
- Goto prompt
- ElseIf b = "capacity" Then
- Goto capacity
- EndIf
- If b = "help" Then
- TextWindow.WriteLine("Type l2t for pounds to tons")
- TextWindow.WriteLine("Type t2l for tons to pounds.")
- TextWindow.WriteLine("Type o2l for ounces to pounds.")
- TextWindow.WriteLine("Type l2o for pounds to ounces.")
- TextWindow.WriteLine("Type length to go to the length prompt.")
- TextWindow.WriteLine("Type capacity to go to the capacity prompt")
- TextWindow.WriteLine("Type exit to quit the program.")
- Goto mass
- EndIf
- 'Convert pounds to tons
- If b = "l2t" Then
- a = MessageBox.AskForInput("Pounds to tons")
- a = a / 2000
- TextWindow.Write(a)
- TextWindow.Write(" T.")
- TextWindow.WriteLine("")
- Goto mass
- EndIf
- 'Convert tons to pounds
- If b = "t2l" Then
- a = MessageBox.AskForInput("Tons to pounds")
- a = a * 2000
- TextWindow.Write(a)
- TextWindow.Write(" lb.")
- TextWindow.WriteLine("")
- Goto mass
- EndIf
- 'Convert ounces to pounds
- If b = "o2l" Then
- a = MessageBox.AskForInput("Ounces to pounds")
- a = a / 16
- TextWindow.Write(a)
- TextWindow.WriteLine(" lb.")
- TextWindow.WriteLine("")
- Goto mass
- EndIf
- 'Convert pounds to ounces
- If b = "l2o" Then
- a = MessageBox.AskForInput("Pounds to ounces")
- a = a * 16
- TextWindow.Write(a)
- TextWindow.WriteLine(" oz.")
- TextWindow.WriteLine("")
- Goto mass
- EndIf
- capacity:
- c = MessageBox.AskForInput("i2y prompt type help for help.")
- If c = "help" Then
- TextWindow.WriteLine("Type q2g for quarts to gallons")
- TextWindow.WriteLine("Type p2q for pints to quarts")
- TextWindow.WriteLine("Type c2p for cups to pints")
- TextWindow.WriteLine("Type fo2c for fluid ounces to cups")
- TextWindow.WriteLine("Type length to go to the length prompt")
- TextWindow.WriteLine("Type weight to go to the weight prompt")
- TextWindow.WriteLine("Type exit to quit the program.")
- Goto capacity
- EndIf
- If c = "length" Then
- Goto prompt
- EndIf
- If c = "weight" Then
- Goto mass
- EndIf
- Goto prompt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement