Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. TextWindow.BackgroundColor = "Blue"
  2. TextWindow.ForegroundColor = "Green"
  3. TextWindow.WriteLine("Do not use caps lock on commands.")
  4. 'Beginning loop
  5. prompt:
  6. m = MessageBox.AskForInput("i2y prompt. Type help for help.")
  7. If m = "help" Then
  8. TextWindow.WriteLine("Type i2f for inches to feet.")
  9. TextWindow.WriteLine("Type f2i for feet to inches.")
  10. TextWindow.WriteLine("Type f2y for feet to yards.")
  11. TextWindow.WriteLine("Type y2f for yards to feet.")
  12. TextWindow.WriteLine("Type y2m for yards to miles.")
  13. TextWindow.WriteLine("Type f2m for feet to miles.")
  14. TextWindow.WriteLine("Type m2y for miles to yards.")
  15. TextWindow.WriteLine("Type m2f for miles to feet.")
  16. TextWindow.WriteLine("Type weight to go to the weight prompt.")
  17. TextWindow.WriteLine("Type capacity to go to the capacity prompt.")
  18. TextWindow.WriteLine("Type exit to quit the program.")
  19. Goto prompt
  20. EndIf
  21. 'Yards to miles
  22. If m = "y2m" Then
  23. a = MessageBox.AskForInput("Yards to miles")
  24. a = a / 1760
  25. TextWindow.Write(a)
  26. TextWindow.Write(" M.")
  27. TextWindow.WriteLine("")
  28. Goto prompt
  29. EndIf
  30. 'Feet to miles
  31. If m = "f2m" Then
  32. a = MessageBox.AskForInput("Feet to miles")
  33. a = a / 5280
  34. TextWindow.Write(a)
  35. TextWindow.Write(" M.")
  36. TextWindow.WriteLine("")
  37. Goto prompt
  38. EndIf
  39. 'Miles to yards
  40. If m = "m2y" Then
  41. a = MessageBox.AskForInput("Miles to yards")
  42. a = a * 1760
  43. TextWindow.Write(a)
  44. TextWindow.Write(" yd.")
  45. TextWindow.WriteLine("")
  46. Goto prompt
  47. EndIf
  48. 'Miles to feet
  49. If m = "m2f" Then
  50. a = MessageBox.AskForInput("Miles to feet")
  51. a = a * 5280
  52. TextWindow.Write(a)
  53. TextWindow.Write(" ft.")
  54. TextWindow.WriteLine("")
  55. Goto prompt
  56. EndIf
  57. 'Yards to feet
  58. If m = "y2f" Then
  59. a = MessageBox.AskForInput("Yards to feet")
  60. a = a * 3
  61. TextWindow.Write(a)
  62. TextWindow.Write(" ft.")
  63. TextWindow.WriteLine("")
  64. Goto prompt
  65. EndIf
  66. 'Inches to feet
  67. If m = "i2f" Then
  68. a = MessageBox.AskForInput("Inches to feet")
  69. a = a / 12
  70. TextWindow.Write(a)
  71. TextWindow.Write(" ft.")
  72. TextWindow.WriteLine("")
  73. Goto prompt
  74. EndIf
  75. 'Feet to yards
  76. If m = "f2y" Then
  77. a = MessageBox.AskForInput("Feet to yards")
  78. a = a / 3
  79. TextWindow.Write(a)
  80. TextWindow.Write(" yd.")
  81. TextWindow.WriteLine("")
  82. EndIf
  83. 'Feet to inches
  84. If m = "f2i" Then
  85. a = MessageBox.AskForInput("Feet to inches")
  86. a = a * 12
  87. TextWindow.Write(a)
  88. TextWindow.Write(" in.")
  89. TextWindow.WriteLine("")
  90. Goto prompt
  91. EndIf
  92. 'Use other units
  93. If m = "weight" Then
  94. Goto mass
  95. EndIf
  96. 'Use more units
  97. If m = "capacity" Then
  98. Goto capacity
  99. EndIf
  100. mass:
  101. b = MessageBox.AskForInput("i2y prompt type help for help.")
  102. If b = "length" Then
  103. Goto prompt
  104. ElseIf b = "capacity" Then
  105. Goto capacity
  106. EndIf
  107. If b = "help" Then
  108. TextWindow.WriteLine("Type l2t for pounds to tons")
  109. TextWindow.WriteLine("Type t2l for tons to pounds.")
  110. TextWindow.WriteLine("Type o2l for ounces to pounds.")
  111. TextWindow.WriteLine("Type l2o for pounds to ounces.")
  112. TextWindow.WriteLine("Type length to go to the length prompt.")
  113. TextWindow.WriteLine("Type capacity to go to the capacity prompt")
  114. TextWindow.WriteLine("Type exit to quit the program.")
  115. Goto mass
  116. EndIf
  117. 'Convert pounds to tons
  118. If b = "l2t" Then
  119. a = MessageBox.AskForInput("Pounds to tons")
  120. a = a / 2000
  121. TextWindow.Write(a)
  122. TextWindow.Write(" T.")
  123. TextWindow.WriteLine("")
  124. Goto mass
  125. EndIf
  126. 'Convert tons to pounds
  127. If b = "t2l" Then
  128. a = MessageBox.AskForInput("Tons to pounds")
  129. a = a * 2000
  130. TextWindow.Write(a)
  131. TextWindow.Write(" lb.")
  132. TextWindow.WriteLine("")
  133. Goto mass
  134. EndIf
  135. 'Convert ounces to pounds
  136. If b = "o2l" Then
  137. a = MessageBox.AskForInput("Ounces to pounds")
  138. a = a / 16
  139. TextWindow.Write(a)
  140. TextWindow.WriteLine(" lb.")
  141. TextWindow.WriteLine("")
  142. Goto mass
  143. EndIf
  144. 'Convert pounds to ounces
  145. If b = "l2o" Then
  146. a = MessageBox.AskForInput("Pounds to ounces")
  147. a = a * 16
  148. TextWindow.Write(a)
  149. TextWindow.WriteLine(" oz.")
  150. TextWindow.WriteLine("")
  151. Goto mass
  152. EndIf
  153. capacity:
  154. c = MessageBox.AskForInput("i2y prompt type help for help.")
  155. If c = "help" Then
  156. TextWindow.WriteLine("Type q2g for quarts to gallons")
  157. TextWindow.WriteLine("Type p2q for pints to quarts")
  158. TextWindow.WriteLine("Type c2p for cups to pints")
  159. TextWindow.WriteLine("Type fo2c for fluid ounces to cups")
  160. TextWindow.WriteLine("Type length to go to the length prompt")
  161. TextWindow.WriteLine("Type weight to go to the weight prompt")
  162. TextWindow.WriteLine("Type exit to quit the program.")
  163. Goto capacity
  164. EndIf
  165. If c = "length" Then
  166. Goto prompt
  167. EndIf
  168. If c = "weight" Then
  169. Goto mass
  170. EndIf
  171. Goto prompt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement